fact: Fixpoint ireplace n (p : N -> bool) v ll := match ll with | l :: ll1 => let m := count p l in if n <? m then (replace n p v l) :: ll1 else l :: ireplace (n - m) p v ll1 | nil => nil end.
imports: Ascii String List EqNat NArith