SHARE
TWEET

Untitled




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- open System
- let rec sorted = function
- | (x :: xs) ->
- let left, right = List.partition (fun i -> i < x) xs
- let sleft = sorted left
- let sright = sorted right
- sleft @ (x :: sright)
- | [] -> []
- let rnd = new Random()
- let l = [for i in [1 .. 100] -> rnd.Next(1, 1000)]
- printfn "%A" l
- printfn "%A" <| sorted l
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.