haskey-btree-0.1.0.0: B+-tree implementation in Haskell.

Safe HaskellNone
LanguageHaskell2010

Data.BTree.Impure.Fold

Description

Algorithms related to folding over an impure B+-tree.

Synopsis

Documentation

foldr :: (AllocReaderM m, Key k, Value a) => (a -> b -> b) -> b -> Tree k a -> m b Source #

Perform a right-associative fold over the tree.

foldrWithKey :: (AllocReaderM m, Key k, Value a) => (k -> a -> b -> b) -> b -> Tree k a -> m b Source #

Perform a right-associative fold over the tree key-value pairs.

foldrM :: (AllocReaderM m, Key k, Value a) => (a -> b -> m b) -> b -> Tree k a -> m b Source #

Perform a monadic right-associative fold over the tree.

foldrWithKeyM :: (AllocReaderM m, Key k, Value a) => (k -> a -> b -> m b) -> b -> Tree k a -> m b Source #

Perform a monadic right-assiciative fold over the tree key-value pairs.

foldrIdWithKeyM :: (AllocReaderM m, Key k, Value a) => (k -> a -> b -> m b) -> b -> Height h -> NodeId h k a -> m b Source #

foldrNodeWithKeyM :: (AllocReaderM m, Key k, Value a) => (k -> a -> b -> m b) -> b -> Height h -> Node h k a -> m b Source #

foldrLeafItemsWithKeyM :: (AllocReaderM m, Key k, Value a) => (k -> a -> b -> m b) -> b -> Map k a -> m b Source #

foldMap :: (AllocReaderM m, Key k, Value a, Monoid c) => (a -> c) -> Tree k a -> m c Source #

Map each value of the tree to a monoid, and combine the results.

toList :: (AllocReaderM m, Key k, Value a) => Tree k a -> m [(k, a)] Source #

Convert an impure B+-tree to a list of key-value pairs.