Safe Haskell | Safe |
---|---|
Language | Haskell98 |
This module allows to access elements of arrays, sets and finite maps like elements of records. This is especially useful for working with nested structures consisting of arrays, sets, maps and records.
Maybe we should move it to a separate package,
then we would not need to import array
and containers
package.
Documentation
mapDefault :: Ord key => elem -> key -> T (Map key elem) elem Source
Treats a finite map like an infinite map, where all undefined elements are replaced by a default value.
intMapDefault :: elem -> Int -> T (IntMap elem) elem Source