Skip to content

Instantly share code, notes, and snippets.

@sasa1977
Last active September 24, 2016 09:15
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 sasa1977/af4241af9dfc9e0d1f896c9bd40ccae1 to your computer and use it in GitHub Desktop.
Save sasa1977/af4241af9dfc9e0d1f896c9bd40ccae1 to your computer and use it in GitHub Desktop.
defmodule Fun2MsTest do
@compile {:parse_transform, :ms_transform}
def test do
match_spec = :ets.fun2ms(fn({:foo, bar} = el) when bar == :baz -> el end)
IO.inspect match_spec
end
end
Fun2MsTest.test
# [{{:foo, :"$1"}, [{:==, :"$1", :baz}], [:"$_"]}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment