3 ms·
Mathematica has this: In[1]: Map((1 + #1)&, {a, b, c}) Out[1]: {a + 1, b + 1, c + 1} See https://reference.wolfram.com/language/ref/Function.html.en
by tmoertel 1y ago
Mathematica has this:
In[1]: Map((1 + #1)&, {a, b, c})
Out[1]: {a + 1, b + 1, c + 1}
See https://reference.wolfram.com/language/ref/Function.html.en https://reference.wolfram.com/language/ref/Function.html.en for the full story.
- zelphirkalt 1y agoWhat is that & doing there? I thought it looks neat, but then that & ...
- tmoertel 1y agoThe & is a postfix operator that converts an expression into an anonymous function. See “Pure Functions”: https://reference.wolfram.com/language/tutorial/FunctionalOperations.html#17469 https://reference.wolfram.com/language/tutorial/FunctionalOp...