> Can someone explain to Perl-brained person why the first expression is in
> parenthesis and the second one is in blocks?
Well, to simplify, a paren is evaluated as encountered, while a block is not. You
should notice that 'if is NOT a keyword, but a native function. It needs two
arguments: a value and a block. The value determines if the block will be executed or
not.
So, when REBOL executes that line, it encounters 'if and notices it is a function that
needs two arguments. So, it goes forward with the intent of collecting two values to
pass to 'if. (Consider that '<> is converted from infix to prefix before evaluation.)
So it finds the function '<>, which needs two arguments; those args will be the result
of (back tail path) and "/". The result of the comparison is passed to 'if (as its
first arguments); its second argument is the block [append path "/"], which is
executed only if the first argument is not none or false.
I hope that helps.
Ciao,
/Gabriele./
o--------------------) .-^-. (----------------------------------o
| Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
| GIESSE on IRC \ \-\_/-/ / http://www.amyresource.it/AGI/ |
o--------------------) `-v-' (----------------------------------o