Anonymous functions
fn x => x + 1;
fn : int -> int
(fn x => x + 1) 8;
9 : int
val succ = fn x => x + 1;
val succ = fn : int -> int
fun is syntactic sugar in ML, just like define is in Scheme
Previous slide
Next slide
Back to first slide
View graphic version