Any previously defined function is accessible via the variable that its name refers to. This variable -and any other variable for that matter- can be changed through ordinary variable assignment or through function assignment:
name(expression,...) := expression
The effect is identical to that of function definition except for the fact that no new variable is introduced. Note that any previous value -function or otherwise- is discarded.
At this stage function assignment is not really an essential feature of Pico. Nevertheless, in order to illustrate future use, the more adventurous reader is invited to examine the following transcript:
Note that the definition of the
contains a prescription that starts by redefining itself and then
applying the new definition of q
to the original parameter z
(the curly braces and the semicolon serve to group multiple
expressions, and will be defined later on). Hence the first
application changes the definition of q
and therefore returns the value
The next two applications q(11)
however, use this redefined version of q.
The interesting part about this example is the use of
as a kind of memory for the function
making it behave like an accumulator.