# Tag Info

Accepted

### How can I make assignments persist across sessions?

If you wrap your definitions in Once then their results will be remembered across sessions: ...
• 41.2k

Accepted

### Confusing behavior when passing a variable vs. inlining a function call

Mathematica is an expression rewriting language. When it evaluates: q[[RandomInteger[{1, 2}]]] += 1 It first rewrites it as: ...
• 13.6k
Accepted

### When is a symbol a Symbol? Is there an easy Mathematica way to test if an object is a symbol sort of like a SymbolQ?

I'd probably use x_Symbol in a function argument to control evaluation. Otherwise, one might do the following (thanks to @Leonid for pointing out an oversight). If ...
• 226k
Accepted

### very simple but unexpected aspect of Function[ ]

The issue is that to SetDelayed1 (:=), Function is just a normal head. For your third ...
• 30.2k
Accepted

### How to make Mathematica variables declarative instead of just-in-time?

Edit: method extended for multiple contexts and unlocking mehtod added. Let's protect whatever is a new symbol. In old answer I've manually excluded symbols matching ...
• 135k

### Finding a variable name given its numerical value

a = 1; Select[Names["Global*"], Symbol[#] == 1 &] {"a"} Notice it may not be robust if you have a habit of writing ...
• 135k
Accepted

### How can I make assignments persist across sessions?

Like in all other systems I am familiar with, variable and function definitions exist in memory (RAM) only and do not persist across sessions. If you want a definition to persist, you must save it ...
• 231k

### When is a symbol a Symbol? Is there an easy Mathematica way to test if an object is a symbol sort of like a SymbolQ?

How about: SymbolQ[_Symbol] = True SymbolQ[_] = False ?
• 13.6k
Accepted

### How can I define variables that follow a naming pattern?

Here's a pretty natural way, I think, that almost matches your variable names. ...
• 22.4k

### Cannot get determinant of matrix

Mathematica does not distinguish between row and column vectors (...
• 140k
Accepted

### Is it possible to define conjugate of a function?

Conjugate[f[x_]] := fc[x]; will fail because MMA tries to store this rule under Conjugate, which is protected. However, you may ...
• 37.5k

### How to Set parts of indexed lists?

This is not a precise answer to the actual question, but the list of answers is from 2012 and IMO does urgently lack a note about Association. Since version 10 (...
• 23.3k

### How can one manually change the rule ordering

This is more of an extended comment in response to @LLlAMnYP is there a way to do this without knowing the existing definitions in advance? or maybe use Prepend? You can roll a function like so: <...
• 11.3k

### How can one manually change the rule ordering

Updated Updated twice, once to force autoloading, and a second time to eliminate duplicate *Values I will answer the last part of the question, specifically: Or conversely to make sure a definition ...
• 127k
Accepted

### Quit vs ClearAll["Global*"]`

There are significant practical differences. Quit does not "clear" anything, it instead restarts the kernel, i.e. resets it to the default state. There ...
• 231k
Accepted

### How do I insert OwnValues inside a held expression without evaluating it?

ClearAll[a, b]; a := 1 + 1 b = Sqrt Is this acceptable? ...
• 135k