-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A lazy, infinite trie of integers. -- -- A simple lazy, infinite trie from integers. @package data-inttrie @version 0.0.2 -- | Provides a minimal infinite, lazy trie for integral types. It -- intentionally leaves out ideas such as delete and emptiness so that it -- can be used lazily, eg. as the target of an infinite foldr. -- Essentially its purpose is to be an efficient implementation of a -- function from integral type, given point-at-a-time modifications. module Data.IntTrie -- | A trie from integers to values of type a. -- -- Semantics: [[IntTrie a]] = Integer -> a data IntTrie a -- | The identity trie. -- --
-- apply identity = id --identity :: (Bits a) => IntTrie a -- | Apply the trie to an argument. This is the semantic map. apply :: (Ord b, Bits b) => IntTrie a -> b -> a -- | Modify the function at one point -- --
-- apply (modify x f t) i | i == x = f (apply t i) -- | otherwise = apply t i --modify :: (Ord b, Bits b) => b -> (a -> a) -> IntTrie a -> IntTrie a -- | Overwrite the function at one point -- --
-- overwrite i x = modify i (const x) --overwrite :: (Ord b, Bits b) => b -> a -> IntTrie a -> IntTrie a instance Applicative IntTrie instance Functor IntTrie instance Applicative BitTrie instance Functor BitTrie