MathGroup Archive 2001

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

Search the Archive

Re: don't understand #


In article <9dnrhs$sv6 at smc.vnet.net>, "Borut L" <borut at email.si> wrote:

> Hi,
> 
> I can't solve this one:
> 
> I want a function f to map on two lists sequently... like Table!
> 
> smth. like
> 
> f[x,#(1st),#(2nd)]&/@{{1,2,3},{a,b,c}}
> 
> should produce {f[x,1,a],f[x,1,b],...f[x,3,c]}
> 
> 
> 
> Please help. Thank,
> 
> Borut Levart

One way....


In[1]:=
Apply[f[x,#1,#2]&,Transpose[#],{1}]&@{{1,2,3},{a,b,c}}

Out[1]=
{f[x,1,a],f[x,2,b],f[x,3,c]}

--David

-- 
) Scientific Arts: http://www.scientificarts.com     
) Creative Services and Consultation for the Applied                            
) and Pure Sciences:: David Reiss: dreiss at !SPAMscientificarts.com
) [Remove the !SPAM to send email]


  • Prev by Date: Re: Names[] for definitions in the current window/notebook?
  • Next by Date: AW: Exponential Equations
  • Previous by thread: RE: don't understand #
  • Next by thread: Re: Mandelbrot