Linked Questions

602 votes
19 answers
156k views

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 ...
212 votes
26 answers
17k views

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
1k views

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,124
16 votes
4 answers
3k views

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
  • 144k
20 votes
4 answers
574 views

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.6k
5 votes
3 answers
199 views

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
169 views

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
121 views

An evaluation control problem

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

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
87 views

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