Forall behaviour?

Started by Endo on 30-May-2010/9:34:26-7:00
Is this by desing? b: [a b c d e] forall b [] b >> [a b c d e] ;it is still is head forall b [if 'c = first b [break]] b >> [c d e] ;if we break the loop, it stays at the position where we break
'Forall is a mezzanine so you can see, and change, it's design: source forall You'll see that forall is based on forskip, which is also a mezzanine: source forskip
If you wanted to change forskip's operation, for example, it would be better to create a new function (my-forskip), because there are likely other mezzanine functions built on forskip.
Note that older versions of REBOL 2 does not place the index back at the head again in the FORALL function, when it completes the series, while newer ones do. FORALL alters the index of the input function.
Henrik, Not sure if Carl is aware, but the first page that comes up in Google for 'forall still explains the old behavior: http://www.rebol.com/docs/words/wforall.html

Reply