Currying in ML
fun add (x,y) = x+y;
val add = fn : int * int -> int
add (7,2);
val it = 9
fun plus x y = x+y;
val plus = fn : int -> int -> int
plus 7 2;
val it = 9;
val anotherWeek = plus 7;
val anotherWeek = fn : int -> int
anotherWeek 2;
val it = 9
Previous slide
Next slide
Back to first slide
View graphic version