let rec fold_map_try f acc = function
| [] -> [], acc
| hd::tl ->
let try (r, r_acc) = f hd acc in
let r_tl, r_acc = fold_map_try f r_acc tl in
r :: r_tl, r_acc
with Not_found -> fold_map_try f acc tl
Subskrybuj:
Komentarze do posta (Atom)
It requires a "let try" syntax extension.
OdpowiedzUsuń