Message Boards Message Boards

2
|
18986 Views
|
1 Reply
|
3 Total Likes
View groups...
Share
Share this post:

Meaning of & /@

Hello everybody,
Does anybody know the meaning of the operator & /@

used in expressions like:
names = StringSplit[#, {".csv", "/"}][[-1]] & /@ filenames;

where filenames is a list of filenames in a path.  

I would like also to know if there is a way to find a list of this kind of operators and their meaning, I couldn't find it in Mathematica Help.

Thank you very much
 & is shorthand for Function, and /@ for Map. Many more operator input forms are listed here.

As an example, take the pure function (# + 3) & which adds 3 to its argument, and map it over the list {1, 2}:
In[1]:= (# + 3) & /@ {1, 2}

Out[1]= {4, 5}
POSTED BY: Ilian Gachevski
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract