pack

pack(v,n) -- packs the elements of the list or sequence v into a table n at a time.

It produces, from a list v, a list of lists formed by packing the elements of v into lists n at a time. The last of the lists produced may have fewer than n elements.

i1 : pack({a,b,c,d,e,f,g,h,i,j,k},3)

o1 = {{a, b, c}, {d, e, f}, {g, h, i}, {j, k}}

o1 : List


topindexpreviousupnext