Hoogle Search

Within LTS Haskell 24.19 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. mapWithKey :: (k -> v1 -> v2) -> HashMap k v1 -> HashMap k v2

    unordered-containers Data.HashMap.Internal.Strict

    Transform this map by applying a function to every value.

  2. mapKeys :: (Eq k2, Hashable k2) => (k1 -> k2) -> HashMap k1 v -> HashMap k2 v

    unordered-containers Data.HashMap.Lazy

    mapKeys f s is the map obtained by applying f to each key of s. The size of the result may be smaller if f maps two or more distinct keys to the same new key. In this case there is no guarantee which of the associated values is chosen for the conflicting key.

    >>> mapKeys (+ 1) (fromList [(5,"a"), (3,"b")])
    fromList [(4,"b"),(6,"a")]
    
    >>> mapKeys (\ _ -> 1) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")])
    fromList [(1,"c")]
    
    >>> mapKeys (\ _ -> 3) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")])
    fromList [(3,"c")]
    

  3. mapMaybe :: (v1 -> Maybe v2) -> HashMap k v1 -> HashMap k v2

    unordered-containers Data.HashMap.Lazy

    Transform this map by applying a function to every value and retaining only some of them.

  4. mapMaybeWithKey :: (k -> v1 -> Maybe v2) -> HashMap k v1 -> HashMap k v2

    unordered-containers Data.HashMap.Lazy

    Transform this map by applying a function to every value and retaining only some of them.

  5. mapWithKey :: (k -> v1 -> v2) -> HashMap k v1 -> HashMap k v2

    unordered-containers Data.HashMap.Lazy

    Transform this map by applying a function to every value.

  6. mapKeys :: (Eq k2, Hashable k2) => (k1 -> k2) -> HashMap k1 v -> HashMap k2 v

    unordered-containers Data.HashMap.Strict

    mapKeys f s is the map obtained by applying f to each key of s. The size of the result may be smaller if f maps two or more distinct keys to the same new key. In this case there is no guarantee which of the associated values is chosen for the conflicting key.

    >>> mapKeys (+ 1) (fromList [(5,"a"), (3,"b")])
    fromList [(4,"b"),(6,"a")]
    
    >>> mapKeys (\ _ -> 1) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")])
    fromList [(1,"c")]
    
    >>> mapKeys (\ _ -> 3) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")])
    fromList [(3,"c")]
    

  7. mapMaybe :: (v1 -> Maybe v2) -> HashMap k v1 -> HashMap k v2

    unordered-containers Data.HashMap.Strict

    Transform this map by applying a function to every value and retaining only some of them.

  8. mapMaybeWithKey :: (k -> v1 -> Maybe v2) -> HashMap k v1 -> HashMap k v2

    unordered-containers Data.HashMap.Strict

    Transform this map by applying a function to every value and retaining only some of them.

  9. mapWithKey :: (k -> v1 -> v2) -> HashMap k v1 -> HashMap k v2

    unordered-containers Data.HashMap.Strict

    Transform this map by applying a function to every value.

  10. mapSize :: Testable prop => (Int -> Int) -> prop -> Property

    tasty-quickcheck Test.Tasty.QuickCheck

    Adjust the test case size for a property, by transforming it with the given function.

Page 70 of many | Previous | Next