Hoogle Search
Within LTS Haskell 24.28 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
adjust :: Ord k => (a -> a) -> k -> MonoidalMap k a -> MonoidalMap k amonoidal-containers Data.Map.Monoidal.Strict No documentation available.
adjustWithKey :: Ord k => (k -> a -> a) -> k -> MonoidalMap k a -> MonoidalMap k amonoidal-containers Data.Map.Monoidal.Strict No documentation available.
adjust :: (a -> a) -> Key -> NEIntMap a -> NEIntMap anonempty-containers Data.IntMap.NonEmpty O(log n). Update a value at a specific key with the result of the provided function. When the key is not a member of the map, the original map is returned.
adjust ("new " ++) 5 (fromList ((5,"a") :| [(3,"b")])) == fromList ((3, "b") :| [(5, "new a")]) adjust ("new " ++) 7 (fromList ((5,"a") :| [(3,"b")])) == fromList ((3, "b") :| [(5, "a")])adjustMax :: (a -> a) -> NEIntMap a -> NEIntMap anonempty-containers Data.IntMap.NonEmpty O(log n). A version of updateMax that disallows deletion, allowing us to guarantee that the result is also non-empty.
adjustMaxWithKey :: (Key -> a -> a) -> NEIntMap a -> NEIntMap anonempty-containers Data.IntMap.NonEmpty O(log n). A version of updateMaxWithKey that disallows deletion, allowing us to guarantee that the result is also non-empty.
adjustMin :: (a -> a) -> NEIntMap a -> NEIntMap anonempty-containers Data.IntMap.NonEmpty O(1). A version of updateMin that disallows deletion, allowing us to guarantee that the result is also non-empty.
adjustMinWithKey :: (Key -> a -> a) -> NEIntMap a -> NEIntMap anonempty-containers Data.IntMap.NonEmpty O(1). A version of adjustMaxWithKey that disallows deletion, allowing us to guarantee that the result is also non-empty. Note that it also is able to have better asymptotics than updateMinWithKey in general.
adjustWithKey :: (Key -> a -> a) -> Key -> NEIntMap a -> NEIntMap anonempty-containers Data.IntMap.NonEmpty O(log n). Adjust a value at a specific key. When the key is not a member of the map, the original map is returned.
let f key x = (show key) ++ ":new " ++ x adjustWithKey f 5 (fromList ((5,"a") :| [(3,"b")])) == fromList ((3, "b") :| [(5, "5:new a")]) adjustWithKey f 7 (fromList ((5,"a") :| [(3,"b")])) == fromList ((3, "b") :| [(5, "a")])
adjust :: Ord k => (a -> a) -> k -> NEMap k a -> NEMap k anonempty-containers Data.Map.NonEmpty O(log n). Update a value at a specific key with the result of the provided function. When the key is not a member of the map, the original map is returned.
adjust ("new " ++) 5 (fromList ((5,"a") :| [(3,"b")])) == fromList ((3, "b") :| [(5, "new a")]) adjust ("new " ++) 7 (fromList ((5,"a") :| [(3,"b")])) == fromList ((3, "b") :| [(5, "a")])adjustAt :: (k -> a -> a) -> Int -> NEMap k a -> NEMap k anonempty-containers Data.Map.NonEmpty O(log n). Variant of updateAt that disallows deletion. Allows us to guarantee that the result is also a non-empty Map.