Sorting Algorithms/Circle Sort: Difference between revisions

m
→‎{{header|Haskell}}: Remove prime (') usage as it was breaking the syntax highlighting
(→‎{{header|Haskell}}: Changed Haskell implementation, removed monadic stuff, and cleaned)
m (→‎{{header|Haskell}}: Remove prime (') usage as it was breaking the syntax highlighting)
Line 994:
go d [x] (s,ks) = (s,x:ks)
go d xs (s,ks) =
let (s'st,_,ls,rs) = halve d s xs xs
in go False ls (go True rs (s'st,ks))
halve d s (y:ys) (_:_:zs) = swap d y (halve d s ys zs)
Anonymous user