The map-exts package

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

Extensions to Data.Map


[Skip to ReadMe]

Properties

Versions0.1.0.0, 0.1.0.1, 0.1.0.1
Change logCHANGELOG.md
Dependenciesbase (>=4.7 && <5), bytestring, cassava, containers (==0.5.*) [details]
LicenseBSD3
Copyright2016 Elsen, Inc
AuthorCharles Cooper
Maintainercooper.charles.m@gmail.com
CategoryData Structures
Home pagehttp://github.com/elsen-trading/map-extensions#readme
Source repositoryhead: git clone https://github.com/elsen-trading/map-extensions
Executablestitanic-example, example
UploadedSat Apr 16 16:32:52 UTC 2016 by coopercm

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for map-exts-0.1.0.1

map-extensions

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.