Repeat()

Returns a Seq.Indexed of value repeated times times. When times is not defined, returns an infinite Seq of value.

Repeat<T>(value: T, times?: number): Seq.Indexed<T>

Discussion

Note: Repeat is a factory function and not a class, and does not use the new keyword during construction.

const { Repeat } = require('immutable') Repeat('foo') // [ 'foo', 'foo', 'foo', ... ] Repeat('bar', 4) // [ 'bar', 'bar', 'bar', 'bar' ]
This documentation is generated from immutable.d.ts. Pull requests and Issues welcome.