カリー化された関数

2007年12月18日
1 分

OCaml の関数はカリー化されているので,部分適用できる。

# let sum_of_twice = sum_of (fun x -> x * 2);;
val sum_of_twice : int -> int = <fun>
# sum_of_twice 5;;
- : int = 30