Mathematica 9 is now available

DivideBy (/=)PrependTo

AppendTo

FilledSmallSquareAppendTo[s, elem] appends elem to the value of s, and resets s to the result.

FilledSmallSquareAppendTo[s, elem] is equivalent to s = Append[s, elem].

FilledSmallSquareAppendTo[s, elem] does not evaluate s.

FilledSmallSquare You can use AppendTo repeatedly to build up a list.

FilledSmallSquare An alternative and often more efficient way to build up a list is to use a sequence of assignments of the form s = s, elem, and then to call Flatten on the resulting structure.

FilledSmallSquare See The Mathematica Book: Section 2.4.4.

FilledSmallSquare See also: PrependTo.

Further Examples

DivideBy (/=)PrependTo



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.