Copyright | (c) Adam Conner-Sax 2019 |
---|---|
License | BSD-3-Clause |
Maintainer | adam_conner_sax@yahoo.com |
Stability | experimental |
Safe Haskell | Safe |
Language | Haskell2010 |
map-reduce engine (fold builder) using [] as its intermediate type.
Synopsis
- listEngine :: (Foldable g, Functor g) => ([(k, c)] -> [(k, g c)]) -> MapReduceFold y k c [] x d
- listEngineM :: (Monad m, Traversable g) => ([(k, c)] -> [(k, g c)]) -> MapReduceFoldM m y k c [] x d
- groupByHashableKey :: (Hashable k, Eq k) => [(k, c)] -> [(k, Seq c)]
- groupByOrderedKey :: Ord k => [(k, c)] -> [(k, Seq c)]
- unpackList :: Unpack x y -> [x] -> [y]
- unpackListM :: UnpackM m x y -> [x] -> m [y]
Engines
listEngine :: (Foldable g, Functor g) => ([(k, c)] -> [(k, g c)]) -> MapReduceFold y k c [] x d Source #
map-reduce-fold builder using (Hashable k, Eq k) keys and returning a [] result
listEngineM :: (Monad m, Traversable g) => ([(k, c)] -> [(k, g c)]) -> MapReduceFoldM m y k c [] x d Source #
effectful map-reduce-fold builder using (Hashable k, Eq k) keys and returning a [] result
groupBy
Functions
groupByHashableKey :: (Hashable k, Eq k) => [(k, c)] -> [(k, Seq c)] Source #
group the mapped and assigned values by key using a Data.HashMap.Strict
groupByOrderedKey :: Ord k => [(k, c)] -> [(k, Seq c)] Source #
group the mapped and assigned values by key using a Data.HashMap.Strict
Helpers
unpackList :: Unpack x y -> [x] -> [y] Source #
unpack for list based map/reduce
unpackListM :: UnpackM m x y -> [x] -> m [y] Source #
effectful unpack for list based map/reduce