stable-tree-0.7.0: Trees whose branches are resistant to change

CopyrightJeremy Groven
LicenseBSD3
Safe HaskellNone
LanguageHaskell2010

Data.StableTree.Walk

Description

Functions for iterating over a StableTree. Currently just folds, but convenience functions for maps will probably be added at some point.

Synopsis

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.