Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Parenthesis reduction

  • To: mathgroup at smc.vnet.net
  • Subject: [mg126956] Re: Parenthesis reduction
  • From: John Doty <noqsiaerospace at gmail.com>
  • Date: Wed, 20 Jun 2012 03:50:18 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jrlfoa$c2s$1@smc.vnet.net> <jrmthi$h6o$1@smc.vnet.net> <jrp8sq$q97$1@smc.vnet.net>

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