Skip to content

Commit 0fdf315

Browse files
PragTobjosevalim
andauthored
Reformulation of one-by-one by the one and only
Co-authored-by: José Valim <[email protected]>
1 parent 2d6cd58 commit 0fdf315

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/elixir/lib/stream.ex

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@ defmodule Stream do
3131
Due to their laziness, streams are useful when working with large
3232
(or even infinite) collections. When chaining many operations with `Enum`,
3333
intermediate lists are created, while `Stream` creates a recipe of
34-
computations that are executed at a later moment.
35-
Notably, the issue with using `Enum` in this context is with the
36-
intermediate lists that are created as their result. An `Enum` function
37-
used on a stream will still process the elements one by one as they are
38-
emitted by the stream.
34+
computations that are executed at a later moment. Then when the
35+
stream is consumed later on, most commonly by using a function in
36+
the `Enum` module, the stream will emit its elements one by one.
3937
4038
Let's see another example:
4139

0 commit comments

Comments
 (0)