Comment on TXR – A Programming Language for Convenient Data MungingparentComments−draegtun7y> ... also allows you to define new operators ... I'm not sure about Rebol/Red - I had only passing contact with it long agoYou couldn't in Rebol 2. But you can in Rebol 3 (Ren/C branch) and Red.For eg, lets take Rebol/Red `multiply` function and provide an infix operator for it (ie. replicating the `*` infix operator)...Rebol 3 (Ren/C): >> multiply 2 4 == 8 >> x: enfix :multiply >> 2 x 4 == 8 Red: >> x: make op! :multiply == make op! [[ "Returns the product of two values" value1 [number! char! pair! tuple! ... >> 2 x 4 == 8
Comments
> ... also allows you to define new operators ... I'm not sure about Rebol/Red - I had only passing contact with it long ago
You couldn't in Rebol 2. But you can in Rebol 3 (Ren/C branch) and Red.
For eg, lets take Rebol/Red `multiply` function and provide an infix operator for it (ie. replicating the `*` infix operator)...
Rebol 3 (Ren/C):
Red: