Skip to content

Instantly share code, notes, and snippets.

@diogovk
Created February 10, 2015 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diogovk/5b49bb73172afc4fe3cf to your computer and use it in GitHub Desktop.
Save diogovk/5b49bb73172afc4fe3cf to your computer and use it in GitHub Desktop.
defmodule M do
def add(x, y) do
x + y
end
end
1 |> M.add(2) |> IO.puts #=> 3
# add1 = 1|> add #=> illegal undefined function add/1
# Em certas linguagens isto faria um currying que é uma aplicação parcial de 1 na função add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment