Reputation
80,208
Next tag badge:
288/100 score
18/20 answers
Badges
8 235 330
Newest
 Good Answer
Impact
~554k people reached

Jul
21
comment How can I define a function taking two distinguishable sets of options?
Seems to be a duplicate of this. At least,my answer there describes what I would personally do in this case.
Jul
19
awarded  Enlightened
Jul
18
comment Is there a name for #1@#2&?
This is correct, but does not seem very relevant to the question being discussed. The question seems to be about a very particular construction, and my digression into some particular aspects of pure functions in my answer was motivated by the comments rather than the original question itself. If your answer is a kind of a reply to that part of my answer, then I hasten to comment that I did not intend to describe pure functions in any extensive manner there, but only considered one particular aspect of them, relevant to the original question and answering the questions raised in comments.
Jul
18
comment Is there a name for #1@#2&?
@Jagra Ok, done. Thanks for the upvote and feedback.
Jul
18
revised Is there a name for #1@#2&?
Added my comments on Function here, per request of Jagra
Jul
18
comment How can I avoid this ReplaceAll trap?
I discussed this issue in my book, here and in the section directly following it. I also seem to remember that this was nicely discussed in the documentation for Rule and RuleDelayed, so you may want to check that out.
Jul
18
comment How can I avoid this ReplaceAll trap?
Use RuleDelayed (:>), instead of Rule (->).
Jul
18
comment Is there a name for #1@#2&?
@Stefan Yes, Function is used to delay evaluation, basically as a run-time macro with delayed evaluation, but not to construct expressions from pieces. I guess this is a Mathematica - specific issue and may be unintuitive when viewed from viewpoints of some other languages. In a sense, there are no functions in Mathematica, just rules and evaluation procedure.
Jul
18
awarded  Nice Answer
Jul
18
comment Is there a name for #1@#2&?
@Stefan ... Therefore, using Function in MapThread will be no different from any other head, which is what you can observe when substituting Function into MapThread in the original example. Put in other way, Function takes care of slots and the ampersand in #1@#2&, but not of @, which is the important thing here.
Jul
18
comment Is there a name for #1@#2&?
@Stefan So Function has to use lazy evaluation, to allow us to separate the process of defining a function expression, from calling that function with some arguments, from "definition-time" to run-time (thus Function is HoldAll). This is a different purpose from that of Compose and Composition (which, for example, don't carry Hold*-attributes, because they don't have to prevent any evaluation). By itself, Function is not able to syntactically construct an expression from its head and elements. And MapThread[f,{{a,b},{x,y}}] will return {f[a,x],f[b,y]} for a generic f...
Jul
18
comment Is there a name for #1@#2&?
@Stefan This is a syntactic issue. Compose is used basically to construct the square brackets, which is syntactically (and also semantically) non-trivial operation. You don't have to tie that to functions - you can think of Compose as a tool for programmatic building of normal expressions with non-trivial heads (the same is also true for Composition). Now, Function serves a different purpose - it allows to construct function calls programmatically by generating a function call code from a function (basically a macro with placeholders) and a sequence of arguments at run-time.
Jul
18
comment Is there a name for #1@#2&?
@Kuba No problem :). This question was destined to emerge sooner or later.
Jul
18
comment Is there a name for #1@#2&?
@Kuba Ok, done.
Jul
18
answered Is there a name for #1@#2&?
Jul
18
comment Is there a name for #1@#2&?
There is, but it is deprecated: Compose. You can also use Composition[#1][#2] &, although this is hardly better. I still use Compose myself, but I would not take the responsibility to recommend this as a common practice.
Jul
17
comment How to compare power towers in Mathematica?
@PiotrShatalin Thanks! I will keep this issue in mind. I think I know how to fix it, but I just need to find some time. Please do ping me again after some time if nothing comes from me.
Jul
17
answered How to group lists that own one common element?
Jul
17
comment Why modules with no variables?
@Mr.Wizard Sorry, right now is bad. Could you please ping me another time (e.g. in a few hours from now)?
Jul
16
awarded  Nice Answer