This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Programming / Assignments  /
UpValues

  • UpValues[ f ] gives a list of transformation rules corresponding to all upvalues defined for the symbol f.
  • You can specify the upvalues for f by making an assignment of the form UpValues[ f ] = list.
  • The list returned by UpValues has elements of the form HoldPattern[ lhs ] :> rhs.
  • See the Mathematica book: Section 2.4.13.
  • See also: Set, DownValues, HoldAllComplete.

    Further Examples

    This defines two upvalues for unitsquare and checks what they are.

    In[1]:=

    Out[1]=

    In[2]:=

    Out[2]=

    In[3]:=

    Out[3]=