mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
style edit
This commit is contained in:
parent
1e21784ce1
commit
e22a55668d
1 changed files with 5 additions and 5 deletions
|
|
@ -383,11 +383,11 @@ let count f l =
|
|||
*)
|
||||
|
||||
let count_true_false p l =
|
||||
fold_left (fun (ok, ko) x ->
|
||||
if p x then (ok + 1, ko)
|
||||
else (ok, ko + 1)
|
||||
) (0, 0) l
|
||||
|
||||
fold_left
|
||||
(fun (ok, ko) x ->
|
||||
if p x then ok + 1, ko
|
||||
else ok, ko + 1)
|
||||
(0, 0) l
|
||||
(*$T
|
||||
count_true_false (fun x -> x mod 2 = 0) [] = (0, 0)
|
||||
count_true_false (fun x -> x mod 2 = 0) [0; 0; 2; 4] = (4, 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue