Commit 227d6672 authored by POTTIER Francois's avatar POTTIER Francois

Redefine [Production.foldnt] using [Misc.iterij].

parent 3c8caf01
......@@ -777,15 +777,9 @@ module Production = struct
let k, k' = ntprods.(nt) in
Misc.iterij k k' f
let foldnt nt (f : index -> 'a -> 'a) accu =
let foldnt nt f accu =
let k, k' = ntprods.(nt) in
let rec loop accu prod =
if prod < k' then
loop (f prod accu) (prod + 1)
loop accu k
Misc.foldij k k' f accu
let mapnt nt f =
let k, k' = ntprods.(nt) in
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