Module Utils.Range
Integer ranges (0..n or lo..high), for quick iteration. Inspired by python's range used in for loop, but with a more functional approach.
val upto : int -> tupto x is range 0,1,..,x-1
val interval : int -> int -> tinterval los high is range lo, lo+1, .., high-1
val inclusive_interval : int -> int -> tinclusive_interval los high is range lo, lo+1, .., high
val iter : (int -> unit) -> t -> unitval fold : (int -> 'acc -> 'acc) -> t -> 'acc -> 'accval forall : (int -> bool) -> t -> boolval exists : (int -> bool) -> t -> boolval sum : (int -> int) -> t -> intsum f r is the f r.start + f (r.start+r.step) + ...
val count : (int -> bool) -> t -> intcount f r counts the number of elements of r that satisfy f
val pp : Stdlib.Format.formatter -> t -> unitval to_list : t -> int listval to_seq : t -> int Stdlib.Seq.t