daily pastebin goal
7%
SHARE
TWEET

Untitled

a guest Sep 20th, 2018 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. open System
  2.  
  3. let rec sorted = function
  4.     | (x :: xs) ->
  5.         let left, right = List.partition (fun i -> i < x) xs
  6.         let sleft = sorted left
  7.         let sright = sorted right
  8.         sleft @ (x :: sright)
  9.     | [] -> []
  10.  
  11. let rnd = new Random()
  12. let l = [for i in [1 .. 100] -> rnd.Next(1, 1000)]
  13.  
  14. printfn "%A" l
  15. 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. OK, I Understand
 
Top