Created
February 9, 2017 18:41
-
-
Save jonleighton/b5767fe101dbef2c0ffe6cd7d0a8a1a7 to your computer and use it in GitHub Desktop.
Which is better?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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