let rev_filter t ~f = let rec find ~f accu = function | [] -> accu | x :: l -> if f x then find ~f (x :: accu) l else find ~f accu l in find ~f [] t