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

sublists -- process interspersed sublists of a list

Synopsis

Description

If g or h is omitted, it is assumed to be the identity.

i1 : sublists( (1,2,3,5,7,8,10,12,13,17,18,20,21), odd, toList, minus)

o1 = {{1}, -2, {3, 5, 7}, -8, -10, -12, {13, 17}, -18, -20, {21}}

o1 : List

Ways to use sublists :