fork download
  1. let rec qsort = function | [] -> []
  2. | h::t -> qsort [for e in h -> if (e <= h) yield e]
  3. @ [h] @
  4. qsort [for e in h -> if (e > h) yield e]
  5.  
  6. let r = new System.Randon()
  7.  
  8. let main() =
  9. let sample = List.init 300 (fun _-> r.Next(int.MaxValue))
  10. System.Console.WriteLine(qsort sample)
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/home/9axHs0/prog.fs(2,69): error FS0010: Unexpected yield in expression

/home/9axHs0/prog.fs(2,57): error FS0589: Unmatched 'if'

/home/9axHs0/prog.fs(4,1): error FS1161: TABs are not allowed in F# code unless the #indent "off" option is used

/home/9axHs0/prog.fs(4,8): warning FS0058: Possible incorrect indentation: this token is offside of context started at position (2:36). Try indenting this token further or using standard formatting conventions.

/home/9axHs0/prog.fs(4,8): warning FS0058: Possible incorrect indentation: this token is offside of context started at position (2:36). Try indenting this token further or using standard formatting conventions.

/home/9axHs0/prog.fs(4,40): error FS0010: Unexpected yield in expression

/home/9axHs0/prog.fs(4,29): error FS0589: Unmatched 'if'

/home/9axHs0/prog.fs(9,1): error FS1161: TABs are not allowed in F# code unless the #indent "off" option is used

/home/9axHs0/prog.fs(10,1): error FS1161: TABs are not allowed in F# code unless the #indent "off" option is used

/home/9axHs0/prog.fs(10,40): error FS1161: TABs are not allowed in F# code unless the #indent "off" option is used
stdout
Standard output is empty