Skip to content

Instantly share code, notes, and snippets.

@jwarwick
Created December 3, 2013 16:52
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 jwarwick/7772766 to your computer and use it in GitHub Desktop.
Save jwarwick/7772766 to your computer and use it in GitHub Desktop.
Elixir lookup not working
defmodule LookupNotWorking do
table = [
{ {:a}, "a"},
{ {:b}, "b"}
]
lc {key, val} inlist table do
def lookup(unquote(key)), do: unquote(val)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment