map-exts-0.1.0.0: Extensions for Data.Map

Safe HaskellSafe
LanguageHaskell2010

Data.Map.Extensions

Synopsis

Documentation

module Data.Map

drop :: Int -> Map k v -> Map k v Source

take :: Int -> Map k v -> Map k v Source

slice :: Ord k => Map k v -> k -> k -> Map k v Source

slicei :: Ord k => Map k v -> Int -> Int -> Map k v Source

keepKeys :: Ord k => Set k -> Map k a -> Map k a Source

dropKeys :: Ord k => Set k -> Map k a -> Map k a Source

filterM :: (Ord k, Monad m) => (v -> m Bool) -> Map k v -> m (Map k v) Source

NEEDS TEST^

transpose :: (Ord a, Ord b) => Lookup2 a b v -> Lookup2 b a v Source

scanl1 :: Ord k => (a -> a -> a) -> Lookup k a -> Lookup k a Source

scanr1 :: Ord k => (a -> a -> a) -> Lookup k a -> Lookup k a Source

groupBy :: Ord b => (a -> b) -> [a] -> Map b [a] Source

groupKeysBy :: (Ord a, Ord b) => (a -> b) -> Lookup a v -> Lookup2 b a v Source

groupElemsBy :: (Ord a, Ord b) => (v -> b) -> Lookup a v -> Lookup2 b a v Source

fromList2 :: (Ord a, Ord b) => [(a, b, v)] -> Lookup2 a b v Source

fromLists :: Ord k => [k] -> [v] -> Map k v Source

lookup2 :: (Ord a, Ord b) => a -> b -> Lookup2 a b v -> Maybe v Source

lookup3 :: (Ord a, Ord b, Ord c) => a -> b -> c -> Lookup3 a b c v -> Maybe v Source

lookup4 :: (Ord a, Ord b, Ord c, Ord d) => a -> b -> c -> d -> Lookup4 a b c d v -> Maybe v Source

type Lookup ix1 tgt = Map ix1 tgt Source

type Lookup2 ix1 ix2 tgt = Map ix1 (Map ix2 tgt) Source

type Lookup3 ix1 ix2 ix3 tgt = Map ix1 (Lookup2 ix2 ix3 tgt) Source

type Lookup4 ix1 ix2 ix3 ix4 tgt = Lookup2 ix1 ix2 (Lookup2 ix3 ix4 tgt) Source