Created
March 9, 2014 19:27
-
-
Save d0rc/9453148 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| lc cid inlist([398, 980, 810]) do | |
| def list(unquote(cid)), do: unquote(@providers |> Enum.filter(fn | |
| [id: _, name: _, currency: c_id, pattern: _, placeholder: _] when c_id = cid -> true; | |
| _ -> false; | |
| end)) | |
| end |
This file contains hidden or 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
| lc cid inlist([398, 980, 810]) do | |
| def list(unquote(cid)), do: unquote(@providers |> Enum.filter(fn | |
| [id: _, name: _, currency: ^cid, pattern: _, placeholder: _] -> true; | |
| _ -> false; | |
| end)) | |
| end |
Author
lc cid inlist([398, 980, 810]) do
def list(unquote(cid)), do: unquote(@providers |> Enum.filter(fn
[id: _, name: _, currency: currencyid, pattern: _, placeholder: _] when currencyid = unquote(cid) -> true;
_ -> false;
end))
end
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh damn, it should be
curr == unquote(cid). Sorry.