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.
findWithDefault :: Ord k => a -> k -> Map k a -> acontainers 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'
findWithDefault :: Ord k => a -> k -> Map k a -> acontainers 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'
findWithDefault :: Ord k => a -> k -> Map k a -> acontainers 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'
findWithDefault :: Ord k => a -> k -> Map k a -> acontainers 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'
findWithDefault :: Ord k => a -> k -> NEMap k a -> anonempty-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'
findWithDefault :: Ord k => a -> k -> MonoidalMap k a -> amonoidal-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.
findWithDefault :: Ord k => a -> k -> MonoidalMap k a -> amonoidal-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