With
Substitutes fixed values into an expression before evaluating it.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
With✓With({x = x0, y = y0, ...}, body) with every replaced by its (already evaluated) , then evaluated.Typed signatures
| Type | Package | Applies |
|---|---|---|
(any, any) -> any | combinatorics | always |
Details
- The bindings are simultaneous, not sequential — a later binding's value expression cannot see an earlier one in the same ; each is computed against the surrounding context alone. Use nested for one binding to see the previous.
- A binding list is : as MathJSON, —
=parses to , not to compute-engine's own . - Unlike Module, introduces no fresh variable — it is pure substitution, so a name used as an never shadows an outer binding beyond the substituted occurrences in itself.
Examples
About
| Examples | 2 |
|---|---|
| Checked against | Wolfram Language 2 agree |
| Crosswalk | Wolfram Language |
See also: Module