MathGroup Archive 2009

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

Search the Archive

Re: How do you take apart a sequence?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102050] Re: [mg102030] How do you take apart a sequence?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Tue, 28 Jul 2009 02:02:51 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

expr = Sequence[3, 5]

Sequence[3,5]

Make it a list first

{expr}[[1]]

3

or first wrap it in any undefined function

f[expr][[1]]

3


Bob Hanlon

---- zslevi <zslevi at gmail.com> wrote: 

=============
In[75]:=
b[3, 5, 7][[1]]

Out[75]= 3

In[77]:= Sequence[3, 5][[1]]

During evaluation of In[77]:= Part::partd: Part specification \
3[[5,1]] is longer than depth of object. >>

Out[77]= 3[[5, 1]]

I'm new to Mathematica.
Is there a way to take apart a sequence?



  • Prev by Date: Re: How do you take apart a sequence?
  • Next by Date: ReplacePart except first element?
  • Previous by thread: Re: How do you take apart a sequence?
  • Next by thread: Re: How do you take apart a sequence?