Package: effect
Module: Iterable
Returns a Iterable containing a value repeated the specified number of times.
Details
n is normalized to an integer greater than or equal to 1.
Example (Repeating a value)
import { Iterable } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(Array.from(Iterable.replicate("a", 3)), ["a", "a", "a"])
Signature
declare const replicate: { (n: number): <A>(a: A) => Iterable<A>; <A>(a: A, n: number): Iterable<A>; }
Since v2.0.0