Ope meet Haskell

PHOTO EMBED

Thu May 28 2020 22:12:31 GMT+0000 (UTC)

Saved by @opeispo #haskell

-- instances of the Ord typeclass have the ordering operators defined.
-- i.e ==, /= , <= etc
-- Ord a is a context
qsort :: Ord a => [a] => [a]
qsort [] = []
qsort (x:rest) = [v | v <- rest, v <= x] ++ [x] ++ [v | v <- rest, v > x]
content_copyCOPY

https://blog.opemipo.dev/programming-language/functional-programming/haskell/2020/05/10/ope-meet-haskell.html