Linked Questions

47
votes
2answers
2k views

How do you set attributes on SubValues?

SubValues, as discussed in a previous question, are declared as follows ...
30
votes
2answers
1k 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]]] ...
18
votes
1answer
707 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::...
4
votes
2answers
148 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 ...
13
votes
1answer
236 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: ...
6
votes
1answer
133 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 ...
4
votes
1answer
133 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,...
3
votes
2answers
155 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 ...
4
votes
1answer
84 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 <...
1
vote
0answers
174 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: ...