The map-exts package

[Tags:bsd3, library, program]

Extensions to Data.Map

[Skip to Readme]


Change log
Dependencies base (>=4.7 && <5), bytestring, cassava, containers (==0.5.*) [details]
License BSD3
Copyright 2016 Elsen, Inc
Author Charles Cooper
Stability Unknown
Category Data Structures
Home page
Source repository head: git clone
Uploaded Sat Apr 16 16:33:52 UTC 2016 by coopercm
Distributions NixOS:
Downloads 77 total (6 in the last 30 days)
1 []
Status Docs available [build log]
Last success reported on 2016-11-26 [all 1 reports]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for map-exts

Readme for map-exts-


This module contains some extensions to Data.Map. Some of them are convenience functions.

It also contains functions to support a split-apply-combine workflow, by representing labeled, multi-dimensional data as multiply nested Maps. For instance, a two dimensional matrix with one axis indexed by 'Name's and the other axis labeled by 'Job's, we would represent such a structure with a Lookup2 Name Job Double. Such a structure is not terribly efficient (it takes O(n log(n)) space and O(log(n)) time for insert/update/delete operations with high constant factor owing to all the pointer manipulation), but it is expressive.

Here is the rough correspondence between split-apply-combine and the verbs used in this package:

split : groupBy

apply : fmap

combine : foldr/foldMap

reshape : transpose

For more information, see the examples.