Hi all,

I wonder how to best define what the THRU keyword is doing? When I saw the 
description of the THRU keyword in the official documents, the following 
recursive idiom came to my mind:

a: [thru b] ; is defined recursively as:
ar: [b | skip ar]

; Tests:

b: #"x"
parse "ab" a ; == false
parse "ab" ar ; == false
parse "abx" a ; == true
parse "abx" ar ; == true
b: "xy"
parse "ab" a ; == false
parse "ab" ar ; == false
parse "abxy" a ; == true
parse "abxy" ar ; == true
; so far so good, but now:
parse "ab" [thru end] ; == false
; while:
b: [end]
parse "ab" ar ; == true

Comments?

Peta



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

Reply via email to