Mathematica 9 is now available

PrependTo

Usage

PrependTo[s, elem]s的值优先考虑elem,对结果重设s


Notes

PrependTo[s, elem]等于s = Prepend[s, elem].
PrependTo[s, elem]并不计算s.
• 可以重复使用PrependTo建立一个列表。
• 参见 Mathematica 全书: 2.4.4.
• 同时参见: AppendTo.
Further Examples

This prepends the number 44 to the beginning of the list.

In[1]:=  

Out[1]=

In[2]:=  

Out[2]=

The original list is changed as a side effect.

In[3]:=  

Out[3]=

On the other hand, Prepend does not change the new version of the list.

In[4]:=  

Out[4]=

In[5]:=  

Out[5]=

In[6]:=  



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.