From 1ce8e765e1916578fd3fd28d32871ce5ac3bb957 Mon Sep 17 00:00:00 2001 From: Edelita Date: Wed, 16 Feb 2022 16:27:53 -0800 Subject: [PATCH] Add link to courses.csv in for Etude 7-1 --- ch07-hashes.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ch07-hashes.asciidoc b/ch07-hashes.asciidoc index 2c416a3..6b228bb 100644 --- a/ch07-hashes.asciidoc +++ b/ch07-hashes.asciidoc @@ -20,7 +20,7 @@ Your job in this étude is to read the file and create a +HashDict+ whose key is Opening Files ^^^^^^^^^^^^^ -To open file _test.csv_, which you will find in the example download area at _URL goes here_, use +File.open/2+, which takes the path to a file as its first argument and a list of options as its second argument. Here is a shell session that opens the file, reads one line, and then closes the file. +To open file _courses.csv_, which you will find in the https://github.com/oreillymedia/etudes-for-elixir/blob/master/code/ch07-01/courses.csv[Github repo here], use +File.open/2+, which takes the path to a file as its first argument and a list of options as its second argument. Here is a shell session that opens the file, reads one line, and then closes the file. // [source,iex] ---- @@ -184,4 +184,4 @@ false Notice that I decided to round the latitude and longitude to two digits. If you decide to do this and you use +Kernel.round/2+, remember that its first argument must be of type +float+. In order to allow people to use integers for latitude and longitude, I simply multiplied them by 1.0, which converted them to the correct type. -<> \ No newline at end of file +<>