Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
@annotate inc(Int) :: Int
def inc(num), do: num + 1
@annotate id(A) :: A
def id(x), do: x
@annotate map([A], (A -> B)) :: [B]
def map(x, f), do:, f)
@annotate abs(Number) :: Number
def abs(number), do: :erlang.abs(number)
Copy link

guilleiguaran commented Jul 30, 2015

"Haskell-y" alternative

@annotate map :: ([A], (A -> B)) -> [B]


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