Mathematica 9 is now available
Services & Resources / Wolfram Forums
MathGroup Archive
*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
  • Subject: [mg68863] Re: List Help Needed
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at>
  • Date: Mon, 21 Aug 2006 06:33:18 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <ecbo4l$r5j$>
  • Sender: owner-wri-mathgroup at

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

lst = {{a, b}, {c, d}, {e, f}};

lst /. {x_, y_} -> {x, f[y]}

--> {{a, f[b]}, {c, f[d]}, {e, f[f]}}

({#1[[1]], f[#1[[2]]]} & ) /@ lst

--> {{a, f[b]}, {c, f[d]}, {e, f[f]}}


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