Skip to content

charles-cooper/map-exts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 99.3%
  • Shell 0.7%