Skip to content

Instantly share code, notes, and snippets.

@jonleighton
Created February 9, 2017 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonleighton/b5767fe101dbef2c0ffe6cd7d0a8a1a7 to your computer and use it in GitHub Desktop.
Save jonleighton/b5767fe101dbef2c0ffe6cd7d0a8a1a7 to your computer and use it in GitHub Desktop.
Which is better?
# Option 1
list |> List.wrap |> Enum.map(&(&1["value"]))
# Option 2
Enum.map(List.wrap(list), &(&1["value"]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment