let rec filt f li =         
  match li with             
  | [] -> []                
  | x::xs ->                
    match f x with          
    | true  -> x :: filt f xs
    | false -> filt f xs  

let rec filt f = function
  | []             -> []
  | x::xs when f x -> x :: filt f xs
  | _::xs          -> filt f xs

let rec filt f = function
  | [] -> []
  | x::xs -> if f x                    
               then x :: filt f xs
               else filt f xs

let rec filt f = function
  | [] -> []
  | x::xs ->
    match f x with
    | true  -> x :: filt f xs
    | false -> filt f xs

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: