Hoogle Search
Within LTS Haskell 24.35 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
map :: (a -> b) -> NonEmpty a -> NonEmpty bbase Data.List.NonEmpty Map a function over a NonEmpty stream.
-
base GHC.Base map f xs is the list obtained by applying f to each element of xs, i.e.,
map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] map f [x1, x2, ...] == [f x1, f x2, ...]
this means that map id == idExamples
>>> map (+1) [1, 2, 3] [2,3,4]
>>> map id [1, 2, 3] [1,2,3]
>>> map (\n -> 3 * n + 1) [1, 2, 3] [4,7,10]
-
base GHC.List map f xs is the list obtained by applying f to each element of xs, i.e.,
map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] map f [x1, x2, ...] == [f x1, f x2, ...]
this means that map id == idExamples
>>> map (+1) [1, 2, 3] [2,3,4]
>>> map id [1, 2, 3] [1,2,3]
>>> map (\n -> 3 * n + 1) [1, 2, 3] [4,7,10]
map :: (Word8 -> Word8) -> ByteString -> ByteStringbytestring Data.ByteString O(n) map f xs is the ByteString obtained by applying f to each element of xs.
map :: (Char -> Char) -> ByteString -> ByteStringbytestring Data.ByteString.Char8 O(n) map f xs is the ByteString obtained by applying f to each element of xs
map :: (Word8 -> Word8) -> ByteString -> ByteStringbytestring Data.ByteString.Lazy O(n) map f xs is the ByteString obtained by applying f to each element of xs.
map :: (Char -> Char) -> ByteString -> ByteStringbytestring Data.ByteString.Lazy.Char8 O(n) map f xs is the ByteString obtained by applying f to each element of xs
map :: (Word8 -> Word8) -> ShortByteString -> ShortByteStringbytestring Data.ByteString.Short O(n) map f xs is the ShortByteString obtained by applying f to each element of xs.
map :: (Word8 -> Word8) -> ShortByteString -> ShortByteStringbytestring Data.ByteString.Short.Internal O(n) map f xs is the ShortByteString obtained by applying f to each element of xs.
map :: (Char -> Char) -> Text -> Texttext Data.Text O(n) map f t is the Text obtained by applying f to each element of t. Example:
>>> let message = pack "I am not angry. Not at all." >>> T.map (\c -> if c == '.' then '!' else c) message "I am not angry! Not at all!"
Performs replacement on invalid scalar values.