diff --git a/lib/common.ml b/lib/common.ml index 2d14d78..9cefb05 100644 --- a/lib/common.ml +++ b/lib/common.ml @@ -59,6 +59,8 @@ module Seq = struct if n < 0 then invalid_arg "Seq.take"; take_aux n xs + let ints i = fun () -> Cons (i, ints (succ i)) + let range a b = take (b - a + 1) (ints a) let (--) a b = range a b