Hoogle Search
Within LTS Haskell 24.4 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
map :: (a -> b) -> Infinite a -> Infinite binfinite-list Data.List.Infinite Apply a function to every element of an infinite list.
map :: (Char -> Char) -> JSString -> JSStringjsaddle Data.JSString O(n) map f t is the JSString obtained by applying f to each element of t. Subject to fusion. Performs replacement on invalid scalar values.
map :: (Char -> Char) -> Stream Char -> Stream Charjsaddle Data.JSString.Internal.Fusion.Common O(n) map f xs is the Stream Char obtained by applying f to each element of xs. Properties
unstream . map f . stream = map f
-
numeric-prelude NumericPrelude 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]
-
numeric-prelude NumericPrelude.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]
-
numhask NumHask.Prelude 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 :: (k -> p -> v -> w) -> HashPSQ k p v -> HashPSQ k p wpsqueues Data.HashPSQ O(n) Modify every value in the queue.
map :: (Int -> p -> v -> w) -> IntPSQ p v -> IntPSQ p wpsqueues Data.IntPSQ O(n) Modify every value in the queue.
map :: (k -> p -> v -> w) -> OrdPSQ k p v -> OrdPSQ k p wpsqueues Data.OrdPSQ O(n) Modify every value in the queue.
map :: (ListLike full item, ListLike full' item') => (item -> item') -> full -> full'ListLike Data.ListLike Apply a function to each element, returning any other valid ListLike. rigidMap will always be at least as fast, if not faster, than this function and is recommended if it will work for your purposes. See also mapM.