Skip to content

Add link to courses.csv in for Etude 7-1 #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ch07-hashes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
----
Expand Down Expand Up @@ -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.


<<SOLUTION07-ET04,See a suggested solution in Appendix A.>>
<<SOLUTION07-ET04,See a suggested solution in Appendix A.>>