Skip to content

PreDecrement

PreDecrement[a] subtracts 1 from a and returns the new value.

Attributes[PreDecrement] := {HoldFirst, Protected, ReadProtected}

Simple examples

In[1]:= toModify = 3
Out[1]= 3
In[2]:= PreDecrement[toModify]
Out[2]= 2
In[3]:= toModify
Out[3]= 2