|
definition: |
intersection :: SetRBT a -> SetRBT a -> SetRBT a
intersection s1 s2 = foldr insert (RBT.newTreeLike s1)
(filter (`member` s2) (toList s1))
|
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
documentation: |
Computes the intersection of two (red-black tree) sets. This is done by inserting all elements of the first set contained in the second set into a new set, which order is taken from the first set. |
|
failfree: |
<FAILING> |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,_) |-> _}
|
|
name: |
intersection |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
Data.RedBlackTree.RedBlackTree a -> Data.RedBlackTree.RedBlackTree a -> Data.RedBlackTree.RedBlackTree a |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
yes |
|
totally-defined: |
possibly non-reducible on same data term |