(** List utilities not in the OCaml 5.2 stdlib. *) let rec take n = function | _ when n <= 0 -> [] | [] -> [] | x :: rest -> x :: take (n - 1) rest let rec drop n = function | l when n <= 0 -> l | [] -> [] | _ :: rest -> drop (n - 1) rest