Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
map :: MonoidNull v2 => (v1 -> v2) -> MonoidMap k v1 -> MonoidMap k v2monoidmap-internal Data.MonoidMap.Internal Applies a function to all non-null values of a MonoidMap. Satisfies the following properties for all functions f:
(get k m == mempty) ==> (get k (map f m) == mempty ) (get k m /= mempty) ==> (get k (map f m) == f (get k m))
Conditional properties
If applying function f to mempty produces mempty, then the following additional properties hold:(f mempty == mempty) ==> (∀ k. get k (map f m) == f (get k m))
(f mempty == mempty) ==> (∀ g. map (f . g) m == map f (map g m))
map :: (v1 -> v2) -> Map k v1 -> Map k v2monoidmap-internal Data.MonoidMap.Internal.RecoveredMap No documentation available.
map :: (Key -> Key) -> IntMultiSet -> IntMultiSetmultiset Data.IntMultiSet O(n*log n). map f s is the multiset obtained by applying f to each element of s.
map :: Ord b => (a -> b) -> MultiSet a -> MultiSet bmultiset Data.MultiSet O(n*log n). map f s is the multiset obtained by applying f to each element of s.
-
row-types Data.Row.Records A function to map over a record given a constraint.
-
row-types Data.Row.Variants A function to map over a variant given a constraint.
map :: (SymVal a, SymVal b) => (SBV a -> SBV b) -> SList a -> SList bsbv Data.SBV.List map f s maps the operation on to sequence.
>>> map (+1) [1 .. 5 :: Integer] [2,3,4,5,6] :: [SInteger] >>> map (+1) [1 .. 5 :: WordN 8] [2,3,4,5,6] :: [SWord8] >>> map singleton [1 .. 3 :: Integer] [[1],[2],[3]] :: [[SInteger]] >>> import Data.SBV.Tuple >>> import GHC.Exts (fromList) >>> map (\t -> t^._1 + t^._2) (fromList [(x, y) | x <- [1..3], y <- [4..6]] :: SList (Integer, Integer)) [5,6,7,6,7,8,7,8,9] :: [SInteger]
Of course, SBV's map can also be reused in reverse:>>> sat $ \l -> map (+1) l .== [1,2,3 :: Integer] Satisfiable. Model: s0 = [0,1,2] :: [Integer]
map :: (SymVal a, SymVal b) => (SBV a -> SBV b) -> SMaybe a -> SMaybe bsbv Data.SBV.Maybe Map over the Just side of a Maybe.
>>> prove $ \x -> fromJust (map (+1) (sJust x)) .== x+(1::SInteger) Q.E.D. >>> let f = uninterpret "f" :: SInteger -> SBool >>> prove $ \x -> map f (sJust x) .== sJust (f x) Q.E.D. >>> map f sNothing .== sNothing True
map :: forall (m :: Type -> Type) a b . Monad m => (a -> b) -> Pipe m a bstreamly-core Streamly.Internal.Data.Pipe Lift a pure function to a Pipe.
map :: forall (m :: Type -> Type) a b . Monad m => (a -> b) -> Stream m a -> Stream m bstreamly-core Streamly.Internal.Data.Stream No documentation available.