From b0ecd3e4062bb9012ea9623237d0b379bd7646f2 Mon Sep 17 00:00:00 2001 From: acondolu Date: Sun, 10 Jun 2018 16:49:49 +0200 Subject: [PATCH] Step possible beyond the args of p.div --- ocaml/simple.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ocaml/simple.ml b/ocaml/simple.ml index 60b4e87..079774e 100644 --- a/ocaml/simple.ml +++ b/ocaml/simple.ml @@ -257,9 +257,11 @@ let inert_cut_at n t = let find_eta_difference p t = let divargs = args_of_inert p.div in let conargs = args_of_inert t in + let rec range i j = + if j = -1 then [] else i :: range (i+1) (j-1) in let rec aux k divargs conargs = match divargs,conargs with - [],_ -> [] + [],conargs -> range k (List.length conargs) | _::_,[] -> [k] | t1::divargs,t2::conargs -> (if not (eta_eq t1 t2) then [k] else []) @ aux (k+1) divargs conargs -- 2.39.2