Transforming funs to match specifications

There is no way to have ets:fun2ms/1 in Elixir, as Elixir disallows parse transforms. However you can use macros to achieve the same thing.