Skip to content

Instantly share code, notes, and snippets.

@binarytemple
Created May 5, 2016 22:32
Show Gist options
  • Save binarytemple/7b869df02d4435236aa6f3a7563e7cf5 to your computer and use it in GitHub Desktop.
Save binarytemple/7b869df02d4435236aa6f3a7563e7cf5 to your computer and use it in GitHub Desktop.
[1, 2, 3] |> Stream.take_while(fn(x) -> x < 3 end) |> Stream.map(fn(x) -> x * 2 end)
Enum.to_list([1, 2, 3] |> Stream.take_while(fn(x) -> x < 3 end) |> Stream.map(fn(x) -> x * 2 end))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment