diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1995-11-19 16:54:24 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1995-11-19 16:54:24 +0000 |
commit | b904cf7ae9c5f5db9c1a914e902967b72ceff87e (patch) | |
tree | 41d1d241239d045e6b2b4de0c5e8fa61269c2fc8 /stdlib/list.ml | |
parent | cf1616269a407ed6c5ec18ab5e290d8994e901f2 (diff) |
map2 de gauche a droite
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@457 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/list.ml')
-rw-r--r-- | stdlib/list.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/list.ml b/stdlib/list.ml index 6dc3c6c9f..c4dfb3ab9 100644 --- a/stdlib/list.ml +++ b/stdlib/list.ml @@ -62,7 +62,7 @@ let rec fold_right f l accu = let rec map2 f l1 l2 = match (l1, l2) with ([], []) -> [] - | (a1::l1, a2::l2) -> f a1 a2 :: map2 f l1 l2 + | (a1::l1, a2::l2) -> let r = f a1 a2 in r :: map2 f l1 l2 | (_, _) -> invalid_arg "List.map2" let rec iter2 f l1 l2 = |