robocop/CamlM — Issue #1: Passage d'une fonction en argument
Author: robocop
Created: 2011-12-30 10:44:32+00:00
State: open

```
# let rec fold_left f x0 = function
[] -> x0
| x::xs -> fold_left f (f x0 x) xs;;
\f -> \x0 ->
# fold_left (\x y -> x+y) 0 [1;2;3];;
6
# let sum l = fold_left (\x y -> x+y) 0 l;;
\l -> () (l)
# sum [1;2;3];;
Erreur : f non connu
```