MathGroup Archive 2006

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

Search the Archive

Re: List Help Needed

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68875] Re: [mg68845] List Help Needed
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Tue, 22 Aug 2006 05:20:04 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

data={{a,b},{c,d},{e,g}};

MapAt[f, #, 2]&/@data

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

{#[[1]],f[#[[2]]]}&/@data

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

Thread[{First/@data,f/@Last/@data}]

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

%==%%===%%%

True


Bob Hanlon

---- Nimrod <jdedguard-agent at yahoo.co.uk> wrote: 
> What combination of Map, MapAt, ...
> 
> will transform {{a,b},{c,d},...} to {{a,f[b]},{c,f[d]},...}
> 
> Thanks in advance.
> 
> Nimrod
> 


  • Prev by Date: Help !! problems with symbolize
  • Next by Date: Re: List Help Needed
  • Previous by thread: Re: List Help Needed
  • Next by thread: Re: List Help Needed