Re: How do you take apart a sequence?
- To: mathgroup at smc.vnet.net
- Subject: [mg102049] Re: [mg102030] How do you take apart a sequence?
- From: "David Park" <djmpark at comcast.net>
- Date: Mon, 27 Jul 2009 06:53:31 -0400 (EDT)
- References: <17567590.1248688813131.JavaMail.root@n11>
Sequence is meant to splice arguments into some function. Part is a function so when you splice you obtain: Part[Sequence[3,5],1] goes to Part[3,5,1]. This means you are looking for the 1st part of the 5th part of the Integer 3. But 3 has no parts so you obtain an error message. You could use: Unevaluated[Sequence[3, 5]][] 3 David Park djmpark at comcast.net http://home.comcast.net/~djmpark/ From: zslevi [mailto:zslevi at gmail.com] In:= b[3, 5, 7][] Out= 3 In:= Sequence[3, 5][] During evaluation of In:= Part::partd: Part specification \ 3[[5,1]] is longer than depth of object. >> Out= 3[[5, 1]] I'm new to Mathematica. Is there a way to take apart a sequence?