Portability | portable |
---|---|
Stability | beta |
Maintainer | wren@community.haskell.org |
Additional convenience versions of the generic functions.
- lookupWithDefault :: a -> KeyString -> Trie a -> a
- insertIfAbsent :: KeyString -> a -> Trie a -> Trie a
- insertWith :: (a -> a -> a) -> KeyString -> a -> Trie a -> Trie a
- insertWithKey :: (KeyString -> a -> a -> a) -> KeyString -> a -> Trie a -> Trie a
- adjustWithKey :: (KeyString -> a -> a) -> KeyString -> Trie a -> Trie a
- update :: (a -> Maybe a) -> KeyString -> Trie a -> Trie a
- updateWithKey :: (KeyString -> a -> Maybe a) -> KeyString -> Trie a -> Trie a
- disunion :: Trie a -> Trie a -> Trie a
- unionWith :: (a -> a -> a) -> Trie a -> Trie a -> Trie a
lookupBy
variants
lookupWithDefault :: a -> KeyString -> Trie a -> aSource
Lookup a key, returning a default value if it's not found.
alterBy
variants
insertIfAbsent :: KeyString -> a -> Trie a -> Trie aSource
Insert a new key, retaining old value on conflict.
insertWith :: (a -> a -> a) -> KeyString -> a -> Trie a -> Trie aSource
Insert a new key, with a function to resolve conflicts.
adjustWithKey :: (KeyString -> a -> a) -> KeyString -> Trie a -> Trie aSource
Apply a function to change the value at a key.
update :: (a -> Maybe a) -> KeyString -> Trie a -> Trie aSource
Apply a function to the value at a key, possibly removing it.