repeat
make a list with identical elements
(long n, any x) -> list
Returns a list of length n
that contains value x
in every position.
Returns nil
if n
is nil
.
Throws an error if n
is negative.
Parameters
Name | Type | Description |
---|---|---|
n |
long | The length of the returned list |
x |
any | The value to repeat |