λ

2.6: Higher order functions

You may frequently avoid direct recursion by use of higher-order functions: pass in a function to another function, which then handles the details of iteration or aggregation using your passed in the function. Examples include:

(* examples/hofs.sml *)