let rec partition f = function
| [] -> ([], [])
| x::xs ->
let (ys, zs) = partition f xs
match f x with
| true -> (x::ys, zs)
| false -> (ys, x::zs)
[1..8] |> partition (fun x -> x%2 = 1) |> printfn "%A"
To embed this project on your website, copy the following code and paste it into your website's HTML: