Linked Questions

603 votes
19 answers

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
214 votes
26 answers

What are some useful, undocumented Mathematica functions?

There have already been some questions about some undocumented functionality in Mathematica. Such as (please add to these lists!) How can one find undocumented options or option values in Mathematica?...
50 votes
1 answer

What does Internal`InheritedBlock do?

What does the function Internal`InheritedBlock do? How is it different from the regular Block?
Ted Ersek's user avatar
  • 7,134
16 votes
4 answers

Subscripts - Why do I see the error "only assignments to symbols are allowed" when using a Module and not otherwise?

When I type Remove["Global`*"] foo[] := Module[{Subscript[a, 1] = "x"}, 0]; foo[] I get the expected error "only assignments to symbols are allowed". I ...
Nasser's user avatar
  • 146k
20 votes
4 answers

Function that caches when it returns unevaluated

How would you go about implementing a function that caches not the result but the fact that it didn't match a pattern? So that it doesn't waste time recomputing a complex time-consuming pattern ...
Rojo's user avatar
  • 42.7k
5 votes
3 answers

Why does `Block` reset `Attributes`?

Not even "formal symbols" such as \[FormalX] are guaranteed to always be symbolic. Their Protected argument is forgotten when ...
masterxilo's user avatar
  • 5,739
5 votes
1 answer

How do I localize an assignment to expression (instead of symbol) within scoping construct?

Is it possible to localize an assignment to an expression (defined via UpSet) instead of a Symbol within a scoping construct? ...
QuantumDot's user avatar
  • 19.7k
4 votes
2 answers

An evaluation control problem

I want to have a function called printRes[expr_,var_], which does the following: ...
matheorem's user avatar
  • 17.2k
22 votes
0 answers

Documentation of the frequently-used functions in the context of Internal` and Compile` [duplicate]

In this site, I have gradually found out that there is a collection of functions in all kinds of answers. For instance, Compile`GetElement, ...
2 votes
2 answers

Issues Implementing Pure Function

Thanks in advance for any assistance you may be able to provide. I'm new to Mathematica and running into issues creating a usable function from the code seen below. For context, all of this code works ...
Jim's user avatar
  • 31