repeat -package:foundation -package:ghc -package:utility-ht

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.
repeat x is an infinite ByteString, with x the value of every element.
repeat x is an infinite ByteString, with x the value of every element.
repeat x is an infinite Text, with x the value of every element.
Produce an infinite stream consisting entirely of the given value. Subject to fusion
repeat x is an infinite list, with x the value of every element.
>>> take 20 $ repeat 17
[17,17,17,17,17,17,17,17,17...
repeat x is an infinite list, with x the value of every element.
>>> repeat 17
[17,17,17,17,17,17,17,17,17...
Repeat an element ad inf. .
>>> S.print $ S.take 3 $ S.repeat 1
1
1
1
repeat x is an infinite list, with x the value of every element.
Create a container with as many copies as possible of a given value. That is, for a container with fixed size n, the call repeat x will generate a container with n copies of x.
repeat x is an infinite ByteStream, with x the value of every element.
>>> R.stdout $ R.take 50 $ R.repeat 60
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

>>> Q.putStrLn $ Q.take 50 $ Q.repeat 'z'
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
repeat x is an infinite ByteStream, with x the value of every element.
An infinite list where each element is the same
Produce an infinite stream.
Generate an infinite stream by repeating a pure value.
Generate an infinite stream by repeating a pure value.
A repeat structure.
Generate an infinite stream by repeating a pure value.
>>> repeat x = Stream.repeatM (pure x)
Generate an infinite stream by repeating a pure value. Pre-release
repeat x returns a constant stream, where all elements are equal to x.
"repeat a" creates a vector with as many copies of a as demanded by the context.
>>> repeat 6 :: Vec 5 Int
6 :> 6 :> 6 :> 6 :> 6 :> Nil