repeat -package:foundation -package:streamly package:base

repeat x is an infinite list, with x the value of every element.

Examples

>>> take 10 $ repeat 17
[17,17,17,17,17,17,17,17,17, 17]
>>> repeat undefined
[*** Exception: Prelude.undefined
repeat x returns a constant stream, where all elements are equal to x.