next
|
previous
|
forward
|
backward
|
up
|
top
|
index
|
toc
|
Macaulay2 web site
Macaulay2Doc
>
The Macaulay2 language
>
lists and sequences
>
flatten
flatten -- flatten a list by unnesting lists
Description
flatten m
-- produces a new list from
m
by effectively removing the braces surrounding the elements of any elements of
m
that happen to be lists. Also works for matrices.
i1 : flatten {{2,3,4},{{5}},6} o1 = {2, 3, 4, {5}, 6} o1 : List
Ways to use
flatten
:
flatten(VisibleList)
flatten(Matrix)
-- puts the columns of a matrix into a single row