Macaulay2 » Documentation
Packages » Macaulay2Doc :: ZZ : Thing
next | previous | forward | backward | up | index | toc

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

Ways to use this method: