MathGroup Archive 2001

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

Search the Archive

Re: don't understand #


Borut:

You were close!   What you need is MapThread:

In[1]:=
MapThread[f[x, #1, #2] &, {{1, 2, 3}, {a, b, c}}]
Out[1]=
{f[x, 1, a], f[x, 2, b], f[x, 3, c]}

Ken Levasseur
Math. Sci.
UMass Lowell



Borut L 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



  • Prev by Date: Re: don't understand #
  • Next by Date: help! - questions about Integration
  • Previous by thread: Re: don't understand #
  • Next by thread: Re: don't understand #