You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jscomp/others/belt_Array.mli
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -462,8 +462,8 @@ val partition : 'a array -> ('a -> bool) -> 'a array * 'a array
462
462
(** [partition f a] split array into tuple of two arrays based on predicate f; first of tuple where predicate cause true, second where predicate cause false
463
463
464
464
@example {[
465
-
predicate [|1;2;3;4;5|] (fun x -> if x mod 2 = 0) = ([|2;4|], [|1;2;3|]);;
466
-
predicate [|1;2;3;4;5|] (fun x -> if x mod 2 <> 0) = ([|1;2;3|], [|2;4|]);;
465
+
partition [|1;2;3;4;5|] (fun x -> x mod 2 = 0 ) = ([|2;4|], [|1;2;3|]);;
466
+
partition [|1;2;3;4;5|] (fun x -> x mod 2 <> 0) = ([|1;2;3|], [|2;4|]);;
0 commit comments