Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Data.SplayTree
- class Monoid v => Measured v a | a -> v where
- data SplayTree v a
- null :: SplayTree v a -> Bool
- singleton :: Measured v a => a -> SplayTree v a
- (<|) :: Measured v a => a -> SplayTree v a -> SplayTree v a
- (|>) :: Measured v a => SplayTree v a -> a -> SplayTree v a
- fork :: Measured v a => SplayTree v a -> a -> SplayTree v a -> SplayTree v a
- uncons :: Measured v a => SplayTree v a -> Maybe (a, SplayTree v a)
- unsnoc :: Measured v a => SplayTree v a -> Maybe (SplayTree v a, a)
- data SplitResult v a
- split :: Measured v a => (v -> Bool) -> SplayTree v a -> SplitResult v a
- map :: (Measured v a, Measured w b) => (a -> b) -> SplayTree v a -> SplayTree w b
- mapWithPos :: (Measured v a, Measured w b) => (v -> a -> b) -> SplayTree v a -> SplayTree w b
- mapWithContext :: (Measured v a, Measured w b) => (v -> a -> v -> b) -> SplayTree v a -> SplayTree w b
- traverse :: (Measured v a, Measured w b, Applicative f) => (a -> f b) -> SplayTree v a -> f (SplayTree w b)
- traverseWithPos :: (Measured v a, Measured w b, Applicative f) => (v -> a -> f b) -> SplayTree v a -> f (SplayTree w b)
- traverseWithContext :: (Measured v a, Measured w b, Applicative f) => (v -> a -> v -> f b) -> SplayTree v a -> f (SplayTree w b)
Documentation
Instances
Measured v a => Measured v (SplayTree v a) Source # | |
Foldable (SplayTree v) Source # | |
(Eq a, Eq v) => Eq (SplayTree v a) Source # | |
(Ord a, Ord v) => Ord (SplayTree v a) Source # | |
(Show a, Show v) => Show (SplayTree v a) Source # | |
Measured v a => Semigroup (SplayTree v a) Source # | |
Measured v a => Monoid (SplayTree v a) Source # | |
Construction
Deconstruction
data SplitResult v a Source #
Maps
mapWithPos :: (Measured v a, Measured w b) => (v -> a -> b) -> SplayTree v a -> SplayTree w b Source #
mapWithContext :: (Measured v a, Measured w b) => (v -> a -> v -> b) -> SplayTree v a -> SplayTree w b Source #
Traversals
traverse :: (Measured v a, Measured w b, Applicative f) => (a -> f b) -> SplayTree v a -> f (SplayTree w b) Source #
traverseWithPos :: (Measured v a, Measured w b, Applicative f) => (v -> a -> f b) -> SplayTree v a -> f (SplayTree w b) Source #
traverseWithContext :: (Measured v a, Measured w b, Applicative f) => (v -> a -> v -> f b) -> SplayTree v a -> f (SplayTree w b) Source #