Commit 67fb6ca7 authored by POTTIER Francois's avatar POTTIER Francois

New function [Misc.iterij].

parent feb21c34
......@@ -99,6 +99,11 @@ let iteri n f =
f i
done
let iterij i j f =
for x = i to j - 1 do
f x
done
(* [foldi] implements a [for] loop over integers, from 0 to [n-1],
with an accumulator. [foldij] implements a [for] loop over
integers, from [start] to [n-1], with an accumulator. *)
......
......@@ -68,6 +68,7 @@ val materialize: ('a, 'a option) Hashtbl.t -> 'a -> 'a list
[n-1]. *)
val iteri: int -> (int -> unit) -> unit
val iterij: int -> int -> (int -> unit) -> unit
(* [foldi] implements a [for] loop over integers, from 0 to [n-1],
with an accumulator. [foldij] implements a [for] loop over
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment