rename foreach -> forEach
This commit is contained in:
parent
0f8596ab3f
commit
d0413360d3
@ -24,15 +24,15 @@ rec {
|
|||||||
/* Apply the function to each element in the list. Same as `map`, but arguments
|
/* Apply the function to each element in the list. Same as `map`, but arguments
|
||||||
flipped.
|
flipped.
|
||||||
|
|
||||||
Type: foreach :: [a] -> (a -> b) -> [b]
|
Type: forEach :: [a] -> (a -> b) -> [b]
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
foreach [ 1 2 ] (x:
|
forEach [ 1 2 ] (x:
|
||||||
toString x
|
toString x
|
||||||
)
|
)
|
||||||
=> [ "1" "2" ]
|
=> [ "1" "2" ]
|
||||||
*/
|
*/
|
||||||
foreach = xs: f: map f xs;
|
forEach = xs: f: map f xs;
|
||||||
|
|
||||||
/* “right fold” a binary function `op` between successive elements of
|
/* “right fold” a binary function `op` between successive elements of
|
||||||
`list` with `nul' as the starting value, i.e.,
|
`list` with `nul' as the starting value, i.e.,
|
||||||
|
Loading…
Reference in New Issue
Block a user