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.

  1. concatMap :: (Word8 -> ByteString) -> ByteString -> ByteString

    rio RIO.ByteString

    Map a function over a ByteString and concatenate the results

  2. concatMap :: (Word8 -> ByteString) -> ByteString -> ByteString

    rio RIO.ByteString.Lazy

    Map a function over a ByteString and concatenate the results

  3. module RIO.HashMap

    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

  4. data HashMap k v

    rio RIO.HashMap

    A map from keys to values. A map cannot contain duplicate keys; each key can map to at most one value.

  5. fromMap :: HashMap a () -> HashSet a

    rio RIO.HashSet

    Convert from the equivalent HashMap with () values.

    >>> HashSet.fromMap (HashMap.singleton 1 ())
    fromList [1]
    

  6. toMap :: HashSet a -> HashMap a ()

    rio RIO.HashSet

    Convert to set to the equivalent HashMap with () values.

    >>> HashSet.toMap (HashSet.singleton 1)
    fromList [(1,())]
    

  7. 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]
    

  8. foldMapWithKey :: Monoid m => (k -> a -> m) -> Map k a -> m

    rio 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.

  9. isProperSubmapOf :: (Ord k, Eq a) => Map k a -> Map k a -> Bool

    rio RIO.Map

    Is this a proper submap? (ie. a submap but not equal). Defined as (isProperSubmapOf = isProperSubmapOfBy (==)).

  10. isProperSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Bool

    rio 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)])
    

Page 490 of many | Previous | Next