Now we have to put aside the topic of "local variables" and consider some subtle points concerning the syntax of Refal Plus. These points are not related to the essence of Refal Plus, but rather are due to the fact that the authors of Refal Plus tried to make the syntas of Refal Plus as terse as possible. Unfortunately, this resulted in certain complications in the syntax of Refal Plus.
Basically, all Refal Plus constructs appearing in function definitions are meant either for analyzing the structure of ground expressions or for computing some results. While the analysis of data is performed by means of patterns, the constructs that are used for producing results are paths.
The term path was chosen in order to emphasize that producing a result is a sophisticated process, which can involve a sequence of steps. In a sense, the evaluation moves forward step-by-step "along a path".
A result expression is a "degenerate" kind of path, whose evaluation can be done in a single step.
The construct
It should be noted that the comma
For the purpose of avoiding ambiguity, the description of Refal Plus distinguishes two special classes of paths: rests and sources. Rests and sources are "well-behaved" paths that possess some useful sintactic properties.
A rest is a path that starts with a keyword, which enables it to be unambiguously
separated from the preceeding construct. It should be noted that Refal Plus "keywords" are not
necessary "words" consisting of letters, but may also be combinations of other characters. For
example
A source is a path that contain no commas at the top level of curly braces. For
example
In the following, in the description of Refal Plus, paths will be denoted by
If a path
If a path