mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
fix
This commit is contained in:
parent
1975c98025
commit
89d6feed98
1 changed files with 2 additions and 2 deletions
|
|
@ -530,7 +530,7 @@ let diagonal l =
|
||||||
diagonal [1;2;3] |> List.sort Stdlib.compare = [1, 2; 1, 3; 2, 3]
|
diagonal [1;2;3] |> List.sort Stdlib.compare = [1, 2; 1, 3; 2, 3]
|
||||||
*)
|
*)
|
||||||
|
|
||||||
let partition_filter_either f l =
|
let partition_map_either f l =
|
||||||
let rec iter f l1 l2 l = match l with
|
let rec iter f l1 l2 l = match l with
|
||||||
| [] -> List.rev l1, List.rev l2
|
| [] -> List.rev l1, List.rev l2
|
||||||
| x :: tl ->
|
| x :: tl ->
|
||||||
|
|
@ -542,7 +542,7 @@ let partition_filter_either f l =
|
||||||
|
|
||||||
(*$R
|
(*$R
|
||||||
let l1, l2 =
|
let l1, l2 =
|
||||||
partition_filter_either (function
|
partition_map_either (function
|
||||||
| n when n mod 2 = 0 -> CCEither.Left n
|
| n when n mod 2 = 0 -> CCEither.Left n
|
||||||
| n -> CCEither.Right n
|
| n -> CCEither.Right n
|
||||||
) [0;1;2;3;4]
|
) [0;1;2;3;4]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue