punning v0.1.0 Punning
Punning
With this library you get language support for field punning in maps within Elixir.
The syntax is very simple, when you write
%{field}
this will be transformed into:
%{field: field}
For now it only works in function heads and bodies. You can enable punning by just use-ing this package:
defmodule App
use Punning
def example(%{field}), do: field
def another_example(map), do
%{field} = map
field
end
def factory(bla, bla2), do: %{bla, bla2}
end
Link to this section Summary
Link to this section Functions
Link to this function
transform(ast, acc \\ [])
Hello world.