Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The type RS.RSet a
is like Set
a
, but allows recursive definitions:
>>>
:{
let s1 = RS.insert 23 s2 s2 = RS.insert 42 s1 in RS.get s1 :} fromList [23,42]
Synopsis
- data RSet a
- get :: RSet a -> Set a
- mk :: Set a -> RSet a
- empty :: RSet a
- singleton :: a -> RSet a
- insert :: Ord a => a -> RSet a -> RSet a
- delete :: Ord a => a -> RSet a -> RSet a
- filter :: Ord a => (a -> Bool) -> RSet a -> RSet a
- union :: Ord a => RSet a -> RSet a -> RSet a
- unions :: Ord a => [RSet a] -> RSet a
- intersection :: Ord a => RSet a -> RSet a -> RSet a
- member :: Ord a => a -> RSet a -> RBool
- notMember :: Ord a => a -> RSet a -> RDualBool
- null :: RSet a -> RDualBool
- disjoint :: Ord a => RSet a -> RSet a -> RDualBool
- id :: RSet a -> RSet a
Documentation
filter :: Ord a => (a -> Bool) -> RSet a -> RSet a Source #
\(Fun _ p) -> RS.get (RS.filter p r1) === S.filter p (RS.get r1)
union :: Ord a => RSet a -> RSet a -> RSet a Source #
RS.get (RS.union r1 r2) === S.union (RS.get r1) (RS.get r2)
intersection :: Ord a => RSet a -> RSet a -> RSet a Source #
RS.get (RS.intersection r1 r2) === S.intersection (RS.get r1) (RS.get r2)
notMember :: Ord a => a -> RSet a -> RDualBool Source #
RDB.get (RS.notMember n r1) === S.notMember n (RS.get r1)