Hoogle Search

Within LTS Haskell 23.21 (ghc-9.8.4)

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

  1. findWithDefault :: Ord k => a -> k -> Map k a -> a

    containers Data.Map.Internal

    The expression (findWithDefault def k map) returns the value at key k or returns default value def when the key is not in the map.

    findWithDefault 'x' 1 (fromList [(5,'a'), (3,'b')]) == 'x'
    findWithDefault 'x' 5 (fromList [(5,'a'), (3,'b')]) == 'a'
    

  2. findWithDefault :: Ord k => a -> k -> Map k a -> a

    containers Data.Map.Lazy

    The expression (findWithDefault def k map) returns the value at key k or returns default value def when the key is not in the map.

    findWithDefault 'x' 1 (fromList [(5,'a'), (3,'b')]) == 'x'
    findWithDefault 'x' 5 (fromList [(5,'a'), (3,'b')]) == 'a'
    

  3. findWithDefault :: Ord k => a -> k -> Map k a -> a

    containers Data.Map.Strict

    The expression (findWithDefault def k map) returns the value at key k or returns default value def when the key is not in the map.

    findWithDefault 'x' 1 (fromList [(5,'a'), (3,'b')]) == 'x'
    findWithDefault 'x' 5 (fromList [(5,'a'), (3,'b')]) == 'a'
    

  4. findWithDefault :: Ord k => a -> k -> Map k a -> a

    containers Data.Map.Strict.Internal

    The expression (findWithDefault def k map) returns the value at key k or returns default value def when the key is not in the map.

    findWithDefault 'x' 1 (fromList [(5,'a'), (3,'b')]) == 'x'
    findWithDefault 'x' 5 (fromList [(5,'a'), (3,'b')]) == 'a'
    

  5. findWithDefault :: Ord k => a -> k -> NEMap k a -> a

    nonempty-containers Data.Map.NonEmpty

    O(log n). The expression (findWithDefault def k map) returns the value at key k or returns default value def when the key is not in the map.

    findWithDefault 'x' 1 (fromList ((5,'a') :| [(3,'b')])) == 'x'
    findWithDefault 'x' 5 (fromList ((5,'a') :| [(3,'b')])) == 'a'
    

  6. findWithDefault :: Ord k => a -> k -> MonoidalMap k a -> a

    monoidal-containers Data.Map.Monoidal

    O(log n). The expression (findWithDefault def k map) returns the value at key k or returns default value def when the key is not in the map.

  7. findWithDefault :: Ord k => a -> k -> MonoidalMap k a -> a

    monoidal-containers Data.Map.Monoidal.Strict

    O(log n). The expression (findWithDefault def k map) returns the value at key k or returns default value def when the key is not in the map.

Page 1 of 1