Lists
- To: mathgroup at yoda.physics.unc.edu
- Subject: Lists
- From: "Richard Mercer, Mathematics and Statistics, x2191" <RMERCER at desire.wright.edu>
- 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