MathGroup Archive 1998

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

Search the Archive

Re: [Q] How to get rid of {} ???

  • To:
  • Subject: [mg10726] Re: [Q] How to get rid of {} ???
  • From: "P.J. Hinton" <>
  • Date: Mon, 2 Feb 1998 00:44:20 -0500
  • Organization: Wolfram Research, Inc.
  • References: <6as8tj$>

On 30 Jan 1998, Alessandro Rossi wrote:

> Hi everyone again...
> I'm just curious to ask if is it possible to get rid of the {} simbols
> in a plain list of this kind {a1, a2, a3, ..., an} when you want to use
> the ordered sequence of a1, a2, a3, ..., an as arguments for a
> function.
> e.g.
> l
> If I have the following list:
> list={True, False, True}
> how can I computethe And Function of the three arguments of list:
> And[True, False, True]
> obviously 
> And[list]
> doesn't work...
> It seems to me a very simple problem, but at the same time I really can
> not solve it. Any samaritan willing to give me some indication to solve
> this "Columbus Egg"???

	And[Evaluate[Sequence @@ list]]

The use of Apply (@@) converts the List into a Sequence.  Because the
And function has the attribute HoldAll, you have to throw an Evaluate
wrapper around the argument.

P.J. Hinton
Mathematica Programming Group  Wolfram
Research, Inc.        
Disclaimer: Opinions expressed herein are those of the author alone.

  • Prev by Date: Re: Bug? Can suddenly not edit with LINUX Frontend
  • Next by Date: RE: Backups in Mathematica
  • Prev by thread: Re: [Q] How to get rid of {} ???
  • Next by thread: Re: [Q] How to get rid of {} ???