Skip to content

Commit 87d0570

Browse files
authored
Merge pull request #3827 from nikgraf/patch-3
fix partition example
2 parents f0d6690 + 3f437ef commit 87d0570

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jscomp/others/belt_Array.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,8 @@ val partition : 'a array -> ('a -> bool) -> 'a array * 'a array
462462
(** [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
463463
464464
@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|]);;
467467
]}
468468
*)
469469

0 commit comments

Comments
 (0)