On 7/21/05, Gregg Irwin <[EMAIL PROTECTED]> wrote:
>=20
> Hi Yao,
>=20
> ZY> Hit upon this late yet still want to share a different way of doing
>=20
> ZY> forall a [if find next a first a [append b: [] first a]]
> ZY> unique b
>=20
> For those who are newer to REBOL, Yao's code has an interesting
> element to it. Notice that "append b: []" is done in-line. In other
> languages, you might expect the empty block, the one B refers to, to
> be reset on each pass, but it isn't. The block itself exists as a
> value, independent of B's existence, and REBOL knows it's the same
> block you're referring to each time.
>=20
> This is one of those subtle things in REBOL that can trip you up at
> times, especially when you're coming from another language, and it's a
> good reason to take some time to understand more about how REBOL works
> internally.
>=20

Which means be carefull with it in functions,
It may sum up the  result of all calls.
And in case of empty input 'a is not set.

But handy in console :)

> -- Gregg
>=20
> --
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
>=20
>=20


--=20
-Volker

"Any problem in computer science can be solved with another layer of
indirection. But that usually will create another problem." David
Wheeler
-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to