Re: Sorting nested list
- To: mathgroup at smc.vnet.net
- Subject: [mg57368] Re: Sorting nested list
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Wed, 25 May 2005 06:03:21 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 5/24/05 at 5:12 AM, pfannerg at stud.uni-graz.at (Gernot Pfanner)
wrote:
>Please forgive me, if this is the 100.000th posting concerning
>sorting a list. But at the moment I'm pretty confused, and so I ask
>you kindly for your help... Given something like
>{{a,{2,4,1.,...}},{b,{3.2,-2,...}}} How do I sort just the inner
>lists (i.e. e.g. {2,4,1.,...}), so that my object finally looks
>like {{a,{1.,2,4.,...}},{b,{-2,3.2,...}}} In this spirit With
>thanks in advance Yours Gernot
I would do this as follows:
{First@#, Sort@Last@#}&/@list
where list contains the data you describe.
--
To reply via email subtract one hundred and four