| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Meep
Description
- data Meep k a
- empty :: Meep k a
- singleton :: k -> a -> Meep k a
- size :: Num b => Meep k a -> b
- null :: Meep k a -> Bool
- fromMaybe :: Maybe (k, a) -> Meep k a
- toMaybe :: Meep k a -> Maybe (k, a)
- maybeing :: Iso (Meep k v) (Meep k' v') (Maybe (k, v)) (Maybe (k', v'))
- intersection :: Eq k => Meep k a -> Meep k b -> Meep k a
- intersectionWith :: Eq k => (a -> b -> c) -> Meep k a -> Meep k b -> Meep k c
- intersectionWithKey :: Eq k => (k -> a -> b -> c) -> Meep k a -> Meep k b -> Meep k c
- keys :: Meep k a -> Maybe k
- elems :: Meep k a -> Maybe a
Documentation
A Meep from key k to value a
Instances
| Bifunctor Meep Source # | |
| Bitraversable Meep Source # | |
| Bifoldable Meep Source # | |
| Biapply Meep Source # | |
| FunctorWithIndex k (Meep k) Source # | |
| FoldableWithIndex k (Meep k) Source # | |
| TraversableWithIndex k (Meep k) Source # | |
| Functor (Meep k) Source # | |
| Foldable (Meep k) Source # | |
| Traversable (Meep k) Source # | |
| Eq k => Apply (Meep k) Source # | |
| (Eq a, Eq k) => Eq (Meep k a) Source # | |
| (Data a, Data k) => Data (Meep k a) Source # | |
| (Ord a, Ord k) => Ord (Meep k a) Source # | |
| (Show k, Show a) => Show (Meep k a) Source # | |
| Generic (Meep k a) Source # | |
| (Eq k, Semigroup a) => Semigroup (Meep k a) Source # |
|
| Eq k => Ixed (Meep k a) Source # | |
| Eq k => At (Meep k a) Source # | |
| AsEmpty (Meep k a) Source # | |
| type Rep (Meep k a) Source # | |
| type Index (Meep k a) Source # | |
| type IxValue (Meep k a) Source # | |
intersection :: Eq k => Meep k a -> Meep k b -> Meep k a Source #
O(1). Intersection of two Meeps
intersection ≡intersectionWithconst
intersectionWith :: Eq k => (a -> b -> c) -> Meep k a -> Meep k b -> Meep k c Source #
O(1). Intersection of two Meeps with a combining function
>>>intersectionWith (+) (Meep "hello" 4) (Meep "hello" 7)fromMaybe (Just ("hello",11))
>>>intersectionWith (+) (Meep "hello" 4) (Meep "bye" 7)fromMaybe Nothing
>>>intersectionWith (+) Empty (Meep "hello" 7)fromMaybe Nothing
intersectionWith f ≡ intersectionWithKey (const f)
intersectionWithKey :: Eq k => (k -> a -> b -> c) -> Meep k a -> Meep k b -> Meep k c Source #
O(1). Intersection of two Meeps with a combining function