2 ms·
No idea what you're looking for, but just for the record: import List(partition) qs [] = [] qs (pivot:rest) = qs smaller ++ pivot : qs larger wher
by the_why_of_y 11y ago
No idea what you're looking for, but just for the record:
import List(partition)
qs [] = []
qs (pivot:rest) = qs smaller ++ pivot : qs larger
where (smaller,larger) = partition (< pivot) rest
Haskell 98, the (polymorphic) type is "Ord a => [a] -> [a]"
- dschiptsov 11y agoHaskell is an exception. Haskell is two distinct languages in one - one for defining types, and one for expressions.)