Linked Questions

56 votes
2 answers
3k views

How do you set attributes on SubValues?

SubValues, as discussed in a previous question, are declared as follows ...
rcollyer's user avatar
  • 34k
33 votes
2 answers
2k views

What is the difference between Composition (@*) and sequential applications (@)?

What is the difference between f@*g@*h@x and f@g@h@x Both evaluate to f[g[h[x]]] ...
orome's user avatar
  • 12.8k
19 votes
1 answer
777 views

How to add named characters to Mathematica 10 or later?

Any news regarding this for Mathematica 12? It appears that native support for the Klingon alphabet has been removed from version 10: \[KlingonA] Syntax::...
Mr.Wizard's user avatar
  • 271k
4 votes
2 answers
168 views

Generating compiled functions from inactive expressions

I am working on a project in which I need to dynamically generate CompiledFunctions from Inactive expressions. For example, I ...
David Zhang's user avatar
  • 2,316
10 votes
1 answer
162 views

Is Sow/Reap compatible with Composition?

I'm trying to figure out why these two pieces of code return different results. As expected, f[Reap[Sow[x]]] gives ...
rhennigan's user avatar
  • 1,783
13 votes
1 answer
295 views

Code indenting of // postfix functions

Preamble Following the recommendation of a presentation or article which I now only vaguely remember I have been experimenting with a particular code format: ...
Mr.Wizard's user avatar
  • 271k
5 votes
2 answers
565 views

Return unevaluated expression from function

Is there any way (except using upvalues) to make a function that returns it's input Unevaluated? What I mean by that: Take the following example: ...
Lukas Lang's user avatar
5 votes
1 answer
185 views

How to create an equivalent of Clojure's threading macro in Mathematica?

Clojure, a Lisp type of language, has a so called Thread macro which converts nested function calls into a linear flow of function calls, thus improving readability,...
nilo de roock's user avatar
3 votes
2 answers
278 views

Order of Evaluate for Map

I would like to get a list of variable names as strings. For example, x = 1; y = 2; Map[SymbolName, Unevaluated /@ Unevaluated@{x, y}] {"x", "y"} This works ...
Yi Wang's user avatar
  • 7,347
4 votes
1 answer
106 views

How to define an expression which is differently evaluated in calculations and printed

Let's say, we have a list: values = {1.2, 0.04, 0.9}; Is it possible to replace 0.04 by some expression, which displays as <...
HannesK's user avatar
  • 81