Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: List Help Needed

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68899] Re: [mg68845] List Help Needed
  • From: János <janos.lobb at yale.edu>
  • Date: Tue, 22 Aug 2006 05:20:50 -0400 (EDT)
  • References: <200608210727.DAA27486@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On Aug 21, 2006, at 3:27 AM, Nimrod wrote:

> What combination of Map, MapAt, ...
>
> will transform {{a,b},{c,d},...} to {{a,f[b]},{c,f[d]},...}
>
> Thanks in advance.
>
> Nimrod

Hunor, Magor két dalia, két egy-testvér Nimród fia :)

In[5]:=
lst = {{a, b}, {c, d}, {e, f}}
Out[5]=
{{a, b}, {c, d}, {e, f}}

In[6]:=
({#1[[1]], g[#1[[2]]]} & ) /@
   lst
Out[6]=
{{a, g[b]}, {c, g[d]},
   {e, g[f]}}

János


------------------------------------------
"There was a mighty king in the land of the Huns whose goodness and  
wisdom had no equal."
Nibelungen-Lied


  • Prev by Date: Re: List Help Needed
  • Next by Date: Linear Programming Question
  • Previous by thread: Re: List Help Needed
  • Next by thread: Re: List Help Needed