MathGroup Archive 2012

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

Search the Archive

Re: Parenthesis reduction

On Tuesday, June 19, 2012 3:14:34 AM UTC-4, Nasser M. Abbasi wrote:
 using V 8.04, this does nothing?
> In[1]:= Sequence@@{{a,b,c},{d,e,f},{g,h,i}}
> Out[1]= Sequence[{a,b,c},{d,e,f},{g,h,i}]

What did you expect it to do? {a,b,c},{d,e,f},{g,h,i} is not a proper expression: it has no head, so Sequence[] cannot return it. Sequence[] is not really comprehensible as a "function": in effect it edits its caller's argument list!

Try f[Sequence@@{{a,b,c},{d,e,f},{g,h,i}}]

Always remember that fundamentally, Mathematica is *rewriting expressions* according to rules that *often* correspond to procedure or function evaluation, but sometimes are really something else.

  • Prev by Date: Moment function
  • Next by Date: NDSolve profiling
  • Previous by thread: Re: Parenthesis reduction
  • Next by thread: Export points 3D plots