Tutorial by Examples

Stream is especially useful when you want to run multiple operations on a collection. This is because Stream is lazy and only does one iteration (whereas Enum would do multiple iterations, for example). numbers = 1..100 |> Stream.map(fn(x) -> x * 2 end) |> Stream.filter(fn(x) -> rem(x...

Page 1 of 1