| Author |
Comment/Response |
Bill Simpson
|
11/02/12 1:34pm
In[3]:= g[f_,v_]:=Map[f@@#&,Partition[v,3,1]];
g[f,{a,b,c,d,e}]
Out[4]= {f[a,b,c],f[b,c,d],f[c,d,e]}
OR
In[5]:= g[f_,v_]:=Map[Apply[f,#]&,Partition[v,3,1]];
g[f,{a,b,c,d,e}]
Out[6]= {f[a,b,c],f[b,c,d],f[c,d,e]}
URL: , |
|