RosettaCodeData/Task/Currying/OCaml/currying-1.ocaml
2015-02-20 09:02:09 -05:00

4 lines
220 B
Text

let addnums x y = x+y (* declare a curried function *)
let add1 = addnums 1 (* bind the first argument to get another function *)
add1 42 (* apply to actually compute a result, 43 *)