Skip to content

Instantly share code, notes, and snippets.

@wakproductions
Last active April 29, 2017 17:06
Show Gist options
  • Save wakproductions/d1d22a95e6227600f9597577fce220dc to your computer and use it in GitHub Desktop.
Save wakproductions/d1d22a95e6227600f9597577fce220dc to your computer and use it in GitHub Desktop.
Elixir Cheat Sheet

Function syntaxes

def myfunc(a,b) do
  a + b
end

lambda:
myfunc = fn a, b -> a + b end
myfunc.() # this is one way to call a lambda

Load File Outside of Load Path

https://til.hashrocket.com/posts/591fd34323-require-file-outside-of-load-path

Code.require_file "foo.exs", __DIR__

Phoenix

Install pheonix: mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment