Copyright | Jeremy Groven |
---|---|
License | BSD3 |
Safe Haskell | None |
Language | Haskell2010 |
Functions for iterating over a StableTree. Currently just folds, but convenience functions for maps will probably be added at some point.
- foldM :: (Monad m, Ord k) => (a -> k -> v -> m a) -> a -> StableTree k v -> m a
- foldr :: Ord k => (k -> v -> a -> a) -> a -> StableTree k v -> a
- foldl :: Ord k => (a -> k -> v -> a) -> a -> StableTree k v -> a
Documentation
foldM :: (Monad m, Ord k) => (a -> k -> v -> m a) -> a -> StableTree k v -> m a Source
Monadic fold over a StableTree in the style of foldM
.
foldr :: Ord k => (k -> v -> a -> a) -> a -> StableTree k v -> a Source
Right fold over a StableTree. Similar to foldrWithKey
.
foldl :: Ord k => (a -> k -> v -> a) -> a -> StableTree k v -> a Source
Left fold over a StableTree. Similar to foldlWithKey
.