Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10552

Re: Parenthesis reduction

From John Doty <noqsiaerospace@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Parenthesis reduction
Date 2012-06-20 07:52 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jrrvfv$4sb$1@smc.vnet.net> (permalink)
References <jrlfoa$c2s$1@smc.vnet.net> <jrmthi$h6o$1@smc.vnet.net> <jrp8sq$q97$1@smc.vnet.net>

Show all headers | View raw


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.

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Parenthesis reduction "Mat' G\." <ellocomateo@free.fr> - 2012-06-17 20:47 +0000
  Re: Parenthesis reduction awnl <awnl@gmx-topmail.de> - 2012-06-18 09:46 +0000
  Re: Parenthesis reduction Yves Klett <yves.klett@googlemail.com> - 2012-06-18 09:48 +0000
    Re: Parenthesis reduction "Nasser M. Abbasi" <nma@12000.org> - 2012-06-19 07:14 +0000
      Re: Parenthesis reduction John Doty <noqsiaerospace@gmail.com> - 2012-06-20 07:52 +0000
  Re: Parenthesis reduction David Bailey <dave@removedbailey.co.uk> - 2012-06-18 09:49 +0000
  Re: Parenthesis reduction David Reiss <dbreiss@gmail.com> - 2012-06-18 09:43 +0000
  Re: Parenthesis reduction "Nasser M. Abbasi" <nma@12000.org> - 2012-06-18 09:44 +0000

csiph-web