let rec select (f:'-> bool) (l:'a list) = match l with
  | []   -> []
  | x::c -> if (f x) then (x::(select f c)) else (select f c)