elixir-lang / elixir

Elixir is a dynamic, functional language for building scalable and maintainable applications
https://elixir-lang.org/
Apache License 2.0
24k stars 3.33k forks source link

change comments to match the code #877

Closed kimshrier closed 11 years ago

kimshrier commented 11 years ago

The example for the open/3 function called open! instead of open.

For the iterator/1 function, if you pass in a string instead of a device, the return value is { :ok, iterator_fn } instead of just iterator_fn, which breaks the example. Since the comment talks about converting a device to an iterator, it seemed appropriate to change to comment to:

{ :ok, device } = File.open("README.md")
source = File.iterator(device)

instead of changing it to:

{ :ok, source } = File.iterator("README.md")