mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-01 21:19:27 -06:00
13 lines
214 B
Plaintext
13 lines
214 B
Plaintext
module example
|
|
|
|
import StdEnv
|
|
|
|
qsort :: [Int] -> [Int]
|
|
qsort [] = []
|
|
qsort [p:l] = (qsort [x \\ x<-l | x<p])
|
|
++[p]
|
|
++(qsort [x \\ x<-l | x>=p])
|
|
|
|
Start :: [Int]
|
|
Start = qsort [3,5,1,4,2]
|