Function: repeat()
repeat<
Value
>(value
):Iterable
<Value
,any
,any
>
Returns an infinite iterable that repeatedly yields value
.
Type Parameters
• Value
Parameters
value
Value
Returns
Iterable
<Value
, any
, any
>
Example
import { join, pipe, repeat, take } from 'lfi'
console.log(
pipe(
repeat(`sloth`),
take(4),
join(`, `),
),
)
//=> sloth, sloth, sloth, sloth
Since
v0.0.1