Syntactic
A collection of macros to provide some syntactic sugars for elixir.
List of macros
keysmap
Examples
keys/map are usfule for geting values out of a keyword/map with mathing:
defmodule SomeServer do
use GenServer
import Syntactic
# ...
def handle_cast(:action, state = map(socket, users)) do
# some logic
end
# ...
endInstallation
Add syntactic to your list of dependencies in mix.exs:
def deps do
[{:syntactic, "~> 0.0.1"}]
end
and run mix deps.get.