• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mbarbin / super-master-mind / 235

15 Mar 2026 05:27PM UTC coverage: 89.377% (+1.1%) from 88.313%
235

Pull #52

github

web-flow
Merge 815074dab into 2ed5b7677
Pull Request #52: Improve local stdlib

176 of 188 new or added lines in 15 files covered. (93.62%)

1220 of 1365 relevant lines covered (89.38%)

2320024.62 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.43
/src/stdlib/array0.ml
1
(*********************************************************************************)
2
(*  super-master-mind: A solver for the super master mind game                   *)
3
(*  SPDX-FileCopyrightText: 2021-2025 Mathieu Barbin <mathieu.barbin@gmail.com>  *)
4
(*  SPDX-License-Identifier: MIT                                                 *)
5
(*********************************************************************************)
6

7
include Stdlib.ArrayLabels
8

9
let equal eq t1 t2 =
NEW
10
  t1 == t2 || (Array.length t1 = Array.length t2 && Array.for_all2 eq t1 t2)
×
11
;;
12

13
let is_empty t = Array.length t = 0
1✔
14
let create ~len a = Array.make len a
41,933,198✔
15

16
let filter_mapi t ~f =
17
  t |> Array.to_seqi |> Seq.filter_map (fun (i, x) -> f i x) |> Array.of_seq
298,019✔
18
;;
19

NEW
20
let fold t ~init ~f = fold_left t ~init ~f
×
21

22
let foldi t ~init ~f =
23
  t |> Array.to_seqi |> Seq.fold_left (fun acc (i, e) -> f i acc e) init
40,320✔
24
;;
25

26
let sort t ~compare = sort t ~cmp:(fun a b -> compare a b |> Ordering.to_int)
299,315✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc