Skip to content
Merged
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
7 changes: 5 additions & 2 deletions lib/elixir/lib/stream.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ defmodule Stream do
Due to their laziness, streams are useful when working with large
(or even infinite) collections. When chaining many operations with `Enum`,
intermediate lists are created, while `Stream` creates a recipe of
computations that are executed at a later moment. Let's see another
example:
computations that are executed at a later moment. Then when the
stream is consumed later on, most commonly by using a function in
the `Enum` module, the stream will emit its elements one by one.

Let's see another example:

1..3
|> Enum.map(&IO.inspect(&1))
Expand Down