Using the function
val less100 = less(100)
less100(42) (* true *)
less100(123) (* false *)
An alternative definition:
fun less(n) = fn x => x<n
So we can rewrite our call to for:
for(0, fn x => x + 1, less 100,
op+, 0)
Previous slide
Next slide
Back to first slide
View graphic version