[REBOL] Re: Binding operators
From: fsievert:uos at: 9-Sep-2001 10:26
When REBOL finds a Value it has to look behind it to see if an operator is
following. REBOL does this at the moment (different to FREEBELL) by
looking, if a word called [+ | - | * | / | // | and | or ....] if
following. If an operator-word is following, it trys to use it as an
operator.
See the following example:
compose [1 (:+) 2 3]
== [1 op 2 3]
do compose [1 (:+) 2 3)
== 5
-> When the interpreter evaluates the "1" it does not detect the following
operator to be one (because it is not an operator-word) and so it does not
work.
-> When there is an operator-word, but it does not hold an operator, the
interpreter will throw an error.
Frank
On Sat, 8 Sep 2001, Karl Robillard wrote: