A true operator would use SubValues but here's a position-coded pseudo-operator form "constructor" using UpValues that can be applied to most or all system functions:
\[Bullet] /: h_[pre___, \[Bullet], post___] :=
Function[expr, h[pre, expr, post]];
For example,
Dataset[{a, b, d, c}][
Partition[\[Bullet], 2] /*
MapIndexed[Rule, \[Bullet], {2}]] // Normal
{{a->{1,1},b->{1,2}},{d->{2,1},c->{2,2}}}
• Could not use SubValues with this definition - too deep for evaluator.
• Position coding enables options or other parameters (only Map and a few other system functions allow this). This is also useful for functions like MemberQ where one might operate on either the first or second slot.
• It uses Bullet because it looks nice and takes only 2 chars to input: Alt-8 (ideally, one should be able to type two commas in a row to represent the desired slot, but overloading Null doesn't work).
• Though it seems it only saves one character compared to #...& Function syntax, it also avoids parentheses when combined with RightComposition as in the above example: ... /* (MapIndexed[Rule,#, {2}]&).
RandomSample[#, 3] &[Range[10]]
to be satisfying. In any case, a very good question. $\endgroup$Infix
notation? It looks nice for your example:Range[10]~RandomSample~3
. No need toUnprotect
anything. $\endgroup$EntityList[EntityClass["WolframLanguageSymbol","Curryable"]]
$\endgroup$Unprotect
ing and defining one yourself or hoping that in a future release Wolfram Inc. would include one. $\endgroup$