Re: how to map function with over 1 arguments to list
- To: mathgroup at smc.vnet.net
- Subject: [mg57235] Re: how to map function with over 1 arguments to list
- From: "Stefan Linnik" <- at mk-nntp-1.news.uk.worldonline.com>
- Date: Sat, 21 May 2005 02:40:31 -0400 (EDT)
- References: <d6ka03$168$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi f[x_, y_]:= x + y f[ #[[1]], #[[2]] ]& /@ {{1, 1}, {2, 2}} or Function[ f[ Slot[[1]], Slot[[2]] ] ] /@ {{1, 1}, {2, 2}} Stefan Linnik "xun" <xiaoxun at gmail.com> wrote in message news:d6ka03$168$1 at smc.vnet.net... > Hi, all, > > g[x_]:=x^2; > g/@{1,2,3} results in{1,4,9} > > similarly, how to map f[x_,y_]:=x+y; > to {1,1},{2,2}? > > it seems that f/@{{1,1},{2,2}} doesn't work. > > Thx. > Xun > > > >