Skip to content

Instantly share code, notes, and snippets.

@pkoch
Created May 8, 2017 18:32
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 pkoch/fb6c0c48cada6e66acba09b1447c5ec6 to your computer and use it in GitHub Desktop.
Save pkoch/fb6c0c48cada6e66acba09b1447c5ec6 to your computer and use it in GitHub Desktop.
defmodule Derp do
def project(map, args) do
for k <- args, do: map[k]
end
end
IO.inspect Derp.project(%{a: 1, b: 2}, [:b, :a])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment