val filter_aux (#a #b: Type) (env: b) (f: (b -> a -> Tot bool)) (l: list a)
    : Tot (m: list a {forall x. memP x m ==> f env x})
let rec filter_aux (#a:Type)
                   (#b:Type)
                   (env:b)
                   (f:(b -> a -> Tot bool))
                   (l: list a)
    : Tot (m:list a{forall x. memP x m ==> f env x}) =
      match l with
      | [] -> []
      | hd::tl -> if f env hd then hd::filter_aux env f tl else filter_aux env f tl
val filter_aux (#a #b: Type) (env: b) (f: (b -> a -> Tot bool)) (l: list a)
    : Tot (m: list a {forall x. memP x m ==> f env x})
let rec filter_aux (#a #b: Type) (env: b) (f: (b -> a -> Tot bool)) (l: list a)
    : Tot (m: list a {forall x. memP x m ==> f env x}) =
match l with
| [] -> []
| hd :: tl -> if f env hd then hd :: filter_aux env f tl else filter_aux env f tl
List.Helpers.fst.checked
prims.fst.checked FStar.Pervasives.fsti.checked FStar.List.Tot.fst.checked
List.Helpers.fst
Prims.bool Prims.list Prims.Nil Prims.Cons List.Helpers.filter_aux Prims.l_Forall Prims.l_imp FStar.List.Tot.Base.memP Prims.b2t
module List.Helpers

open FStar.List.Tot

(* Some basic utility functions for closure converting arguments
   to the higher-order combinators in the list library ...
   for use with KaRaMeL extraction *)
let rec filter_aux (#a:Type)
                   (#b:Type)
                   (env:b)
                   (f:(b -> a -> Tot bool))
                   (l: list a)
val filter_aux (#a #b: Type) (env: b) (f: (b -> a -> Tot bool)) (l: list a)
    : Tot (m: list a {forall x. memP x m ==> f env x})
env: b -> f: (_: b -> _: a -> Prims.bool) -> l: Prims.list a
  -> m: Prims.list a {forall (x: a). FStar.List.Tot.Base.memP x m ==> f env x}