MathGroup Archive 2012

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

Search the Archive

Re: Parenthesis reduction


On 17/06/2012 21:47, Mat' G. wrote:
> Which command should one use to get
> 	{a, b, c}, {d, e, f}, {g, h, i}
> from
> 	{{a, b, c}, {d, e, f}, {g, h, i}}
> ?
>
The problem is that your first expression isn't syntactically valid, so 
I presume what you really mean is something like transforming
{{a, b, c}, {d, e, f}, {g, h, i}}
into say

fun[x,y,{a, b, c}, {d, e, f}, {g, h, i},z]

In other words that you want to embed it in something else:

In[1]:= tmp = {{a, b, c}, {d, e, f}, {g, h, i}}

Out[1]= {{a, b, c}, {d, e, f}, {g, h, i}}

In[2]:= fun[x, y, Sequence @@ tmp, z]

Out[2]= fun[x, y, {a, b, c}, {d, e, f}, {g, h, i}, z]

David Bailey
http://www.dbaileyconsultancy.co.uk




  • Prev by Date: Re: Parenthesis reduction
  • Next by Date: Re: Add scale bar to Image
  • Previous by thread: Re: Parenthesis reduction
  • Next by thread: Re: Parenthesis reduction