Cheat Sheets

A collection of cheat sheets.

Hosted on GitHub Pages — Theme by mattgraham

Functions

Definition

def foo(x, y, z) do
    ...
end

Guards

def foo(x, y, z) when cond1, do: ...
def foo(x, y, z) when cond2, do: ...
...

Lambdas

plus = fn (x, y) -> x + y end

# Shorthand notation
plus = &(&1 + &2)