MathGroup Archive 1993

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

Search the Archive


  • To: mathgroup at
  • Subject: Lists
  • From: "Richard Mercer, Mathematics and Statistics, x2191" <RMERCER at>
  • Date: 17 Mar 1993 09:46:35 -0400 (EDT)

Regarding message from Richard ?? and Ed Boss about applying a function
to the second entries of a list of ordered pairs:

A more elegant solution is:
list = {{1,2},{3,4},{5,6}}
MapAt[Sin,#,2]& /@ list

This does the trick. Of course Sin can be replaced by any other function,
(you may need to define it first so you can refer to it by name) and by
replacing 2 by some other integer you can access any entry of an n-tuple.

Richard Mercer

  • Prev by Date: x11ps
  • Next by Date: PostScript production bug ???
  • Previous by thread: Re: Lists
  • Next by thread: Re: Lists