Function: forEach()
Applies fn
to each value of iterable
.
Like Array.prototype.forEach
, but for iterables.
Example
import { forEach, pipe } from 'lfi'
console.log(
pipe(
[`sloth`, `lazy`, `sleep`],
forEach(console.log),
),
)
//=> sloth
//=> lazy
//=> sleep
Since
v0.0.1
Call Signature
forEach<
Value
>(fn
): (iterable
) =>void
Type Parameters
• Value
Parameters
fn
(value
) => unknown
Returns
Function
Parameters
iterable
Iterable
<Value
, any
, any
>
Returns
void
Defined in
Call Signature
forEach<
Value
>(fn
,iterable
):void
Type Parameters
• Value
Parameters
fn
(value
) => unknown
iterable
Iterable
<Value
, any
, any
>
Returns
void