RosettaCodeData/Task/Currying/OCaml/currying-1.ocaml

5 lines
220 B
Text
Raw Permalink Normal View History

2015-02-20 09:02:09 -05:00
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 *)