From: Bill Rowe on 15 May 2010 06:14 On 5/14/10 at 5:35 AM, lshifr(a)gmail.com (Leonid Shifrin) wrote: >How about >In[1]:= MapThread[Apply, {{f, g}, {{a, b}, {c, d}}}] >Out[1]= {f[a, b], g[c, d]} Here is another way In[1]:= Tr[Through[{f, g}[#]] & /@ {{a, b}, {c, d}}, List] Out[1]= {f[{a, b}], g[{c, d}]} But in terms of simplicity, using MapThread seems better
|
Pages: 1 Prev: Execute .m file with JLink Next: Latex, Mathematica, and journals |