MathGroup Archive 2001

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

Search the Archive

Re: don't understand #

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28852] Re: don't understand #
  • From: drnews at NOSPAM--Scientificarts.com (David Reiss)
  • Date: Tue, 15 May 2001 00:59:26 -0400 (EDT)
  • References: <9dnrhs$sv6@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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