Portability | portable |
---|---|
Stability | stable |
Maintainer | Uwe Schmidt (uwe@fh-wedel.de) |
Safe Haskell | Safe-Inferred |
Simple key value assocciation list implemented as unordered list of pairs
- type AssocList k v = [(k, v)]
- lookupDef :: Eq k => v -> k -> AssocList k v -> v
- lookup1 :: Eq k => k -> AssocList k [e] -> [e]
- hasEntry :: Eq k => k -> AssocList k v -> Bool
- addEntry :: Eq k => k -> v -> AssocList k v -> AssocList k v
- addEntries :: Eq k => AssocList k v -> AssocList k v -> AssocList k v
- delEntry :: Eq k => k -> AssocList k v -> AssocList k v
- delEntries :: Eq k => [k] -> AssocList k v -> AssocList k v
Documentation
lookup1 :: Eq k => k -> AssocList k [e] -> [e]Source
lookup with empty list (empty string) as default value
addEntry :: Eq k => k -> v -> AssocList k v -> AssocList k vSource
add an entry, remove an existing entry before adding the new one at the top of the list, addEntry is strict
addEntries :: Eq k => AssocList k v -> AssocList k v -> AssocList k vSource
add a whole list of entries with addEntry
delEntries :: Eq k => [k] -> AssocList k v -> AssocList k vSource
delete a list of entries with delEntry