UpSetDelayed
✖
UpSetDelayed
assigns rhs to be the delayed value of lhs, and associates the assignment with symbols that occur at level one in lhs.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases

https://wolfram.com/xid/0dqxv6ietc6-bdq3u3

https://wolfram.com/xid/0dqxv6ietc6-lyc0lc

Scope (6)Survey of the scope of standard use cases
Left-Hand Sides (5)
An expression with a delayed definition is evaluated every time it is used:

https://wolfram.com/xid/0dqxv6ietc6-bdp7ot

https://wolfram.com/xid/0dqxv6ietc6-be8dyd

Make definitions for special and general cases using immediate and delayed assignments:

https://wolfram.com/xid/0dqxv6ietc6-4yu8wt

https://wolfram.com/xid/0dqxv6ietc6-5ntk8t

The definition can be associated with a symbol appearing as an argument of the left side:

https://wolfram.com/xid/0dqxv6ietc6-i0zpn8

https://wolfram.com/xid/0dqxv6ietc6-by8ow2

The definition can be associated with the head of an argument of the left side:

https://wolfram.com/xid/0dqxv6ietc6-p6v3mu

https://wolfram.com/xid/0dqxv6ietc6-bwq2ej

If several symbols appear in the left-hand side, upvalues for all of them are defined:

https://wolfram.com/xid/0dqxv6ietc6-cwuh4

https://wolfram.com/xid/0dqxv6ietc6-i5sj72


https://wolfram.com/xid/0dqxv6ietc6-dmquby

Properties & Relations (6)Properties of the function, and connections to other functions
^:= defines upvalues in the same way as using a tag does:

https://wolfram.com/xid/0dqxv6ietc6-ms6j1w

https://wolfram.com/xid/0dqxv6ietc6-cs759y

https://wolfram.com/xid/0dqxv6ietc6-kyd9o

A tag defines only one upvalue; ^:= makes definitions for all symbols:

https://wolfram.com/xid/0dqxv6ietc6-erdycr

https://wolfram.com/xid/0dqxv6ietc6-b790ri

https://wolfram.com/xid/0dqxv6ietc6-qy5gli

The right side of an immediate definition is evaluated when the definition is made:

https://wolfram.com/xid/0dqxv6ietc6-hbiamo

https://wolfram.com/xid/0dqxv6ietc6-l2tdph

The right side of a delayed definition is evaluated each time the definition is used:

https://wolfram.com/xid/0dqxv6ietc6-b6q3iz

https://wolfram.com/xid/0dqxv6ietc6-do5ctx

Definitions with the same left side overwrite earlier ones:

https://wolfram.com/xid/0dqxv6ietc6-baac38

https://wolfram.com/xid/0dqxv6ietc6-b0zrxa

https://wolfram.com/xid/0dqxv6ietc6-jxrnrz

Definition prints definitions associated with a symbol:

https://wolfram.com/xid/0dqxv6ietc6-xhhoz

https://wolfram.com/xid/0dqxv6ietc6-ey6jfv

Information prints various information about a symbol, including any definitions:

https://wolfram.com/xid/0dqxv6ietc6-cp0tko
UpValues returns a list of rules corresponding to any upvalues defined:

https://wolfram.com/xid/0dqxv6ietc6-ezhwhw

Delayed assignment introduces a scope that is not affected by global variables:

https://wolfram.com/xid/0dqxv6ietc6-lynxon

https://wolfram.com/xid/0dqxv6ietc6-otatma

https://wolfram.com/xid/0dqxv6ietc6-bj9a49

Immediate assignment does not introduce a scope:

https://wolfram.com/xid/0dqxv6ietc6-t1bwvy

https://wolfram.com/xid/0dqxv6ietc6-3f04oz

Wolfram Research (1988), UpSetDelayed, Wolfram Language function, https://reference.wolfram.com/language/ref/UpSetDelayed.html.
Text
Wolfram Research (1988), UpSetDelayed, Wolfram Language function, https://reference.wolfram.com/language/ref/UpSetDelayed.html.
Wolfram Research (1988), UpSetDelayed, Wolfram Language function, https://reference.wolfram.com/language/ref/UpSetDelayed.html.
CMS
Wolfram Language. 1988. "UpSetDelayed." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/UpSetDelayed.html.
Wolfram Language. 1988. "UpSetDelayed." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/UpSetDelayed.html.
APA
Wolfram Language. (1988). UpSetDelayed. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/UpSetDelayed.html
Wolfram Language. (1988). UpSetDelayed. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/UpSetDelayed.html
BibTeX
@misc{reference.wolfram_2025_upsetdelayed, author="Wolfram Research", title="{UpSetDelayed}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/UpSetDelayed.html}", note=[Accessed: 04-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_upsetdelayed, organization={Wolfram Research}, title={UpSetDelayed}, year={1988}, url={https://reference.wolfram.com/language/ref/UpSetDelayed.html}, note=[Accessed: 04-May-2025
]}