Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | GHC2021 |
HGeometry.Map.NonEmpty.Monoidal
Description
A NonEmpty Monoidal Map, i.e. combining the monoidal maps combines the elements with their semigroup operation.
Synopsis
- newtype MonoidalNEMap k v = MonoidalNEMap {}
- singleton :: k -> v -> MonoidalNEMap k v
- unions1WithKey :: (Foldable1 f, Ord k) => (k -> a -> a -> a) -> f (NEMap k a) -> NEMap k a
- mapWithKeyMerge1 :: (Ord k', Semigroup v') => (k -> v -> NEMap k' v') -> NEMap k v -> NEMap k' v'
Documentation
newtype MonoidalNEMap k v Source #
A NonEmpty Map in which we combine conflicting elements by using their semigroup operation rather than picking the left value (as is done in the default Data.Map)
Constructors
MonoidalNEMap | |
Instances
singleton :: k -> v -> MonoidalNEMap k v Source #
Create a singleton MonoidalNE Map