|
definition: |
partitionEithers :: [Either a b] -> ([a],[b]) partitionEithers = foldr (either left right) ([],[]) where left a (l, r) = (a:l, r) right a (l, r) = (l, a:r) |
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
documentation: |
Partitions a list of `Either` into two lists. All the `Left` elements are extracted, in order, to the first component of the output. Similarly the `Right` elements are extracted to the second component of the output. |
|
failfree: |
() |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{() |-> {foldr}}
|
|
name: |
partitionEithers |
|
precedence: |
no precedence defined |
|
result-values: |
{foldr}
|
|
signature: |
[Prelude.Either a b] -> ([a], [b]) |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
yes |
|
totally-defined: |
reducible on all ground data terms |