[REBOL] Re: ALL and ANY words
From: tomc:darkwing:uoregon at: 1-Feb-2003 14:06
'any & 'all are "short circut" versions of 'or & 'and
and can be used to protect some code from execution
an example to show how the "short-circut 'and" ('all)
differs from the normal 'and consider
>> a: 0
== 0
>> if (a <> 0) and (1 / a) [print "whatever"]
** Math Error: Attempt to divide by zero
** Where: do-boot
** Near: 1 / a
>> if all[(a <> 0) (1 / a)] [print "whatever"]
== none
in the second case the (1 / a) was never reached due to the short circut.
On Fri, 4 Jan 1980, Philippe Oehler wrote: