query
On this page

forEach

lib.forEach

Docs pulled from | This Revision | about 9 hours ago


Apply the function to each element in the list. Same as map, but arguments flipped.

Inputs

xs

1. Function argument

f

2. Function argument

Type

forEach :: [a] -> (a -> b) -> [b]

Examples

lib.lists.forEach usage example

forEach [ 1 2 ] (x:
  toString x
)
=> [ "1" "2" ]
(lib.lists.forEach)

Noogle also knows

Aliases