let rec
qsort = function | [ ] -> [ ] | h
:: t -> qsort [ for e in h
do if ( e
<= h
) then yield e
] @ [ h] @
qsort [ for e in h
do if ( e
> h
) then yield e
]
let r = new System.Random ( )
let main( ) =
let sample = List.init 300 ( fun _-> r.Next ( Int32.MaxValue ) )
System.
Console .
WriteLine ( qsort sample
)
bGV0IHJlYyBxc29ydCA9IGZ1bmN0aW9uIHwgW10gICAtPiBbXQogICAgICAgICAgICAgICAgICAgICAgICAgfCBoOjp0IC0+IHFzb3J0IFtmb3IgZSBpbiBoIGRvIGlmIChlIDw9IGgpIHRoZW4geWllbGQgZV0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBAIFtoXSBACiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXNvcnQgW2ZvciBlIGluIGggZG8gaWYgKGUgPiBoKSB0aGVuIHlpZWxkIGVdCgpsZXQgciA9IG5ldyBTeXN0ZW0uUmFuZG9tKCkKCmxldCBtYWluKCkgPSAKICAgICAgICBsZXQgc2FtcGxlID0gTGlzdC5pbml0IDMwMCAoZnVuIF8tPiByLk5leHQoSW50MzIuTWF4VmFsdWUpKQogICAgICAgIFN5c3RlbS5Db25zb2xlLldyaXRlTGluZShxc29ydCBzYW1wbGUpIA==
compilation info
/home/5idmSx/prog.fs(9,52): error FS0039: The namespace or module 'Int32' is not defined
/home/5idmSx/prog.fs(10,40): error FS0001: The type 'int' is not compatible with the type 'seq<int>'
stdout