definition: |
groupBy :: (a -> a -> Bool) -> [a] -> [[a]] groupBy _ [] = [] groupBy eq (x:xs) = (x:ys) : groupBy eq zs where (ys,zs) = span (eq x) xs |
demand: |
argument 2 |
deterministic: |
deterministic operation |
documentation: |
Splits the list argument into a list of lists of related adjacent elements. @param eq - the relation to classify adjacent elements @param xs - the list of elements @return the list of lists of related adjacent elements |
failfree: |
(_, _) |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{(_,{[]}) |-> {[]} || (_,{:}) |-> {:}} |
name: |
groupBy |
precedence: |
no precedence defined |
result-values: |
{:,[]} |
signature: |
(a -> a -> Prelude.Bool) -> [a] -> [[a]] |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
possibly non-reducible on same data term |