Understanding Flatten

• To: mathgroup at smc.vnet.net
• Subject: [mg46314] Understanding Flatten
• From: Harold.Noffke at wpafb.af.mil (Harold Noffke)
• Date: Fri, 13 Feb 2004 21:58:11 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Mathematica 5.0.1 on Windows 2000
MathGroup:

In my study of Flatten, the Mathematica Book gives this example ...

You can use Flatten to "splice" sequences of elements into lists
or other expressions.

In[5]:= Flatten[ {a, f[b, c], f[a, b, d]}, 1, f ]

Out[5]= {a,b,c,a,b,d}

I modified In[5] as follows ...

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

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

I don't see why adding {g, f[e, g]} as a second list to the In[5] example
unflattens Flatten's answer.  What am I misunderstanding?

Thanks.
Harold

```

• Prev by Date: A zillion times slower in version 5
• Next by Date: Re: how to plot with logarithmic scale on X-axis ?
• Previous by thread: Re: A zillion times slower in version 5
• Next by thread: Re: Understanding Flatten