Apply a callback to an array: Difference between revisions
m
→{{header|Mathematica}}
m (→{{header|Phix}}: fixed a couple of syntax glitches, added personal tag) |
|||
Line 1,834:
</lang>
=={{header|Mathematica}}//{{header|Wolfram Language}}==
<lang Mathematica>(#*#)& /@ {1, 2, 3, 4}
Map[Function[#*#], {1, 2, 3, 4}]
Map[((#*#)&,{1,2,3,4}]
Map[Function[w,w*w],{1,2,3,4}]</lang>
|