Skip to content

Instantly share code, notes, and snippets.

@nicholasjhenry
Last active May 21, 2016 11:51
Show Gist options
  • Save nicholasjhenry/d21fdb1f4b7faa537e98a359f7c8af5d to your computer and use it in GitHub Desktop.
Save nicholasjhenry/d21fdb1f4b7faa537e98a359f7c8af5d to your computer and use it in GitHub Desktop.
Partial application in Elixir
defmodule Foo do
def call(x) do
IO.puts x
end
def bar(x, y) do
IO.puts x
IO.puts y
end
end
x = &Foo.call/1
x = &(Foo.bar("param 1", &1))
x.("param 2")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment