fact: Fixpoint applyUntil (f : list {x : Type & T -> x}) (n : Mem U f) : Ctor f -> T := match n in Mem _ f return Ctor f -> T with | Here a b => fun ctor => applyRest b (ctor v) | Next a b i => fun ctor => applyUntil b i (ctor ((projT2 a) rec)) end.
imports: Coq.Lists.List