Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2009

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

Search the Archive

Re: Shorthand for MapThread

  • To: mathgroup at
  • Subject: [mg95043] Re: [mg95015] Shorthand for MapThread
  • From: "Jose Luis Gomez" <jose.luis.gomez at>
  • Date: Sun, 4 Jan 2009 07:32:49 -0500 (EST)
  • References: <>

Dear Martin:

First: you can write any two-arguments command in infix notation using

For example, evaluate:


And you will obtain foo[a,b]

Therefore, you can evaluate:

f[#1, #2] & ~MapThread~ {{a, b, c}, {d, e, f}}

And you will obtain the same result as MapThread[f[#1, #2] &,{{a, b, c}, =
e, f}}]

Second: In order to make it really convenient, you can evaluate at the
beginning of your document:


After the evaluation above, every time you write mt Mathematica will =
it with MapThread, therefore you will be able to write:

f[#1, #2] & ~mt~ {{a, b, c}, {d, e, f}}

which might be short enough and fast enough for your purposes. On the =
hand, something like /@@ might be too complex to implement, because
Mathematica separates /@ from @ even before trying the evaluation.

Hope that helps.

-----Mensaje original-----
De: Schettler, Martin [mailto:MSchettler at]
Enviado el: S=E1bado, 03 de Enero de 2009 04:55
Para: mathgroup at
Asunto: [mg95015] Shorthand for MapThread

All -

I frequently use Map and MapThread, and find Map's shorthand:

f /@ {a,b,c}

to be very convenient.

As far as I can tell, MapThread has no corresponding "infix" notation.
Can anyone tell me if it's possible (and if so, how) to make my own?

f[#1,#2]& /@@ {{a,b,c},{d,e,f}}


  • Prev by Date: Re: Fourier Transform Graph Coordinates
  • Next by Date: Re: Fourier Transform Graph Coordinates
  • Previous by thread: Shorthand for MapThread
  • Next by thread: Re: Shorthand for MapThread