next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: ZZ : Thing

ZZ : Thing -- repeat an item

Synopsis

Description

n : x repetition n times of x in a sequence

If n is an integer and x is anything, return a sequence consisting of x repeated n times. A negative value for n will silently be treated as zero.

Warning: such sequences do not get automatically spliced into lists containing them.

i1 : {5:a,10:b}

o1 = {(a, a, a, a, a), (b, b, b, b, b, b, b, b, b, b)}

o1 : List
i2 : splice {5:a,10:b}

o2 = {a, a, a, a, a, b, b, b, b, b, b, b, b, b, b}

o2 : List

See also