Function: consume()
consume(
iterable
):void
Iterates through iterable
causing lazy operations to run.
Parameters
iterable
Iterable
<unknown
, any
, any
>
Returns
void
Example
import { consume, each, pipe } from 'lfi'
const iterable = pipe(
[`sloth`, `lazy`, `sleep`],
each(console.log),
)
// No output
consume(iterable)
//=> sloth
//=> lazy
//=> sleep
Since
v2.0.0