Skip to content

Instantly share code, notes, and snippets.

@lepoetemaudit
Last active December 1, 2016 13:03
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 lepoetemaudit/5d8e0a4673f86e9bcfa7e2b44b25329f to your computer and use it in GitHub Desktop.
Save lepoetemaudit/5d8e0a4673f86e9bcfa7e2b44b25329f to your computer and use it in GitHub Desktop.
Faked currying in mlfe
-- In MLFE
module curry_fun
export curried/1
curried arg1 =
let curried2 arg2 =
let curried3 arg3 =
arg1 + arg2 + arg3
in curried3
in
curried2
-- Calling from Erlang
2> (((curry_fun:curried(1))(2))(3)).
6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment