Hoogle Search
Within LTS Haskell 24.34 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
concatMap :: (Word8 -> ByteString) -> ByteString -> ByteStringrio RIO.ByteString Map a function over a ByteString and concatenate the results
concatMap :: (Word8 -> ByteString) -> ByteString -> ByteStringrio RIO.ByteString.Lazy Map a function over a ByteString and concatenate the results
-
Strict Map with hashed keys. Import as:
import qualified RIO.HashMap as HM
This module does not export any partial functions. For those, see RIO.HashMap.Partial -
rio RIO.HashMap A map from keys to values. A map cannot contain duplicate keys; each key can map to at most one value.
fromMap :: HashMap a () -> HashSet ario RIO.HashSet Convert from the equivalent HashMap with () values.
>>> HashSet.fromMap (HashMap.singleton 1 ()) fromList [1]
toMap :: HashSet a -> HashMap a ()rio RIO.HashSet Convert to set to the equivalent HashMap with () values.
>>> HashSet.toMap (HashSet.singleton 1) fromList [(1,())]
concatMap :: Foldable t => (a -> [b]) -> t a -> [b]rio RIO.List Map a function over all the elements of a container and concatenate the resulting lists.
Examples
Basic usage:>>> concatMap (take 3) [[1..], [10..], [100..], [1000..]] [1,2,3,10,11,12,100,101,102,1000,1001,1002]
>>> concatMap (take 3) (Just [1..]) [1,2,3]
foldMapWithKey :: Monoid m => (k -> a -> m) -> Map k a -> mrio RIO.Map Fold the keys and values in the map using the given monoid, such that
foldMapWithKey f = fold . mapWithKey f
This can be an asymptotically faster than foldrWithKey or foldlWithKey for some monoids.isProperSubmapOf :: (Ord k, Eq a) => Map k a -> Map k a -> Boolrio RIO.Map Is this a proper submap? (ie. a submap but not equal). Defined as (isProperSubmapOf = isProperSubmapOfBy (==)).
isProperSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Boolrio RIO.Map Is this a proper submap? (ie. a submap but not equal). The expression (isProperSubmapOfBy f m1 m2) returns True when keys m1 and keys m2 are not equal, all keys in m1 are in m2, and when f returns True when applied to their respective values. For example, the following expressions are all True:
isProperSubmapOfBy (==) (fromList [(1,1)]) (fromList [(1,1),(2,2)]) isProperSubmapOfBy (<=) (fromList [(1,1)]) (fromList [(1,1),(2,2)])
But the following are all False:isProperSubmapOfBy (==) (fromList [(1,1),(2,2)]) (fromList [(1,1),(2,2)]) isProperSubmapOfBy (==) (fromList [(1,1),(2,2)]) (fromList [(1,1)]) isProperSubmapOfBy (<) (fromList [(1,1)]) (fromList [(1,1),(2,2)])