Copyright | (c) Andrey Mulik 2019 |
---|---|
License | BSD-style |
Maintainer | work.a.mulik@gmail.com |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Sort
class Sort s e | s -> e where Source #
Sort
is class of types that can be sorted.
sortedBy :: (e -> e -> Bool) -> s -> Bool Source #
Checks if structure is already sorted. Should always return True
for
structures with less than 2 elements.
sortBy :: Compare e -> s -> s Source #
sortBy
function is common sorting algorithm.