From 8da1b9ffe2c31c04b14b2d7bba9b922a11e9a6e3 Mon Sep 17 00:00:00 2001 From: Valentin Date: Sun, 18 Aug 2019 09:34:12 +0300 Subject: [PATCH] Update example in Enumerables and Streams docs When going through the tutorial I noticed that when executing `stream = File.stream!("path/to/file")` it does not return a function like in the docs `#Function<18.16982430/2 in Stream.resource/3>`. In the proposed change I have added what was returned by `iex`. I am not sure if tha was a mistake. Please close the PR if the docs are correct. --- getting-started/enumerables-and-streams.markdown | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/getting-started/enumerables-and-streams.markdown b/getting-started/enumerables-and-streams.markdown index 23522bf89..41b76ce2e 100644 --- a/getting-started/enumerables-and-streams.markdown +++ b/getting-started/enumerables-and-streams.markdown @@ -113,7 +113,12 @@ Another interesting function is `Stream.resource/3` which can be used to wrap ar ```iex iex> stream = File.stream!("path/to/file") -#Function<18.16982430/2 in Stream.resource/3> +%File.Stream{ + line_or_bytes: :line, + modes: [:raw, :read_ahead, :binary], + path: "path/to/file", + raw: true +} iex> Enum.take(stream, 10) ```