Skip to content

Commit

Permalink
f fix build for older OCaml stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
samoht committed Mar 27, 2023
1 parent ba03cd9 commit e9daaf7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/irmin/import.ml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ module Seq = struct
match seq1 () with
| Nil -> seq2 ()
| Cons (x, next) -> Cons (x, append next seq2)

(* Since 4.14 *)
let rec for_all2 f xs ys =
match xs () with
| Nil -> true
| Cons (x, xs) -> (
match ys () with
| Nil -> true
| Cons (y, ys) -> f x y && for_all2 f xs ys)
end

let shuffle state arr =
Expand Down

0 comments on commit e9daaf7

Please sign in to comment.