MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Part // interesting undocumented feature


A colleague new to Mathematica showed me something that I thought should cause an error:

Part[data[[All,1]]]

Of course, I thought the form should just be "data[[All,1]".

It turns out that there is form of Part that works like an identity function:

In[1]:= Part[5]
Out[1]= 5

Just out of a Mathematica trivia challenge question, can anyone think of an example when this undocumented syntax of Part[ ] could possibly be of use or why the programmers have it as an acceptable syntax?





  • Prev by Date: Solving simple equations
  • Next by Date: How to evaluate parts of an expression, but not other parts?
  • Previous by thread: Re: Solving simple equations
  • Next by thread: Re: Part // interesting undocumented feature