MathGroup Archive 2002

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

Search the Archive

Re: Sequence and Or

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34197] Re: [mg34179] Sequence and Or
  • From: Sseziwa Mukasa <mukasa at jeol.com>
  • Date: Thu, 9 May 2002 05:15:59 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On Wednesday, May 8, 2002, at 10:51 AM, DrBob wrote:

> Sorry.  I don't misunderstand %, and that's not the problem, it's just
> that I stupidly added the second line manually to the text without
> evaluating it all again.  I'll try again.
>
> {True,False,True}
> Or@@%
> Sequence@@%%
> Or[%]
> Or[Sequence@@{True,False,True}]
>
> evaluates to...
>
> {True,False,True}
> True
> Sequence[True,False,True]
> Sequence[True,False,True]
> Sequence[True,False,True]
>
> It's the last two outputs that mystify me, in which Sequence isn't
> evaluated when it needs to be.

OK, I see the mystery, it would make sense if Or had the HoldAllComplete 
or SequenceHold attributes but it really only has the HoldAll attribute 
which should allow Sequence objects to be threaded.  It seems this is 
just a problem with the documentation and HoldAll is the same as 
HoldAllComplete with respect to Sequence.  Wrapping the Sequence in an 
Evaluate give the expected results.  Is there no longer a difference 
between HoldAll and HoldAllComplete in v4.1 or is this a bug?

Regards,

Ssezi



  • Prev by Date: Mathematica help with noncommutative operator manipulations
  • Next by Date: Re: double integral
  • Previous by thread: Re: Sequence and Or
  • Next by thread: Re: Sequence and Or