diff options
| author | Gaëtan Gilbert | 2018-11-06 22:39:48 +0100 |
|---|---|---|
| committer | Gaëtan Gilbert | 2018-11-16 15:08:46 +0100 |
| commit | 563623f4eeb9d9992b1bffb5b71a6b849ba71132 (patch) | |
| tree | 9b5feefda5bf19c67a575159f207cf8d58c5e56a /kernel/constr.ml | |
| parent | 778213b89d893b55e572fc1813c7209d647ed6b0 (diff) | |
Small simplification in fold_constr_with_binders
Diffstat (limited to 'kernel/constr.ml')
| -rw-r--r-- | kernel/constr.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/constr.ml b/kernel/constr.ml index 704e6de6b8..b60a2a4b46 100644 --- a/kernel/constr.ml +++ b/kernel/constr.ml @@ -534,12 +534,12 @@ let fold_constr_with_binders g f n acc c = | Proj (_p,c) -> f n acc c | Evar (_,l) -> Array.fold_left (f n) acc l | Case (_,p,c,bl) -> Array.fold_left (f n) (f n (f n acc p) c) bl - | Fix (_,(lna,tl,bl)) -> - let n' = CArray.fold_left2 (fun c _n _t -> g c) n lna tl in + | Fix (_,(_,tl,bl)) -> + let n' = iterate g (Array.length tl) n in let fd = Array.map2 (fun t b -> (t,b)) tl bl in Array.fold_left (fun acc (t,b) -> f n' (f n acc t) b) acc fd - | CoFix (_,(lna,tl,bl)) -> - let n' = CArray.fold_left2 (fun c _n _t -> g c) n lna tl in + | CoFix (_,(_,tl,bl)) -> + let n' = iterate g (Array.length tl) n in let fd = Array.map2 (fun t b -> (t,b)) tl bl in Array.fold_left (fun acc (t,b) -> f n' (f n acc t) b) acc fd |
