The following behavior in Red seems pretty reasonable, doesn't it?
red>> str: "aaa" == "aaa" red>> parse str [any [remove "a"]] == true red>> str == ""
So why doesn't R3-Alpha do the same?
r3-alpha>> str: "aaa" == "aaa" r3-alpha>> parse str [any [remove "a"]] == false r3-alpha>> str == "aa"
Believe it or not, this was by design. The concept is that if a rule doesn't advance the index, it isn't considered "successful":
I am not a fan. A successful rule is one that matched. The REMOVE matched.
While the REMOVE works in Red, it seems there's still some infinite-loop-avoidance through an advancement in the rules:
red>> parse "a" [any [ahead "a"]] == false
I'm not sure where to draw the line. Personally I'd think that should be an infinite loop. Last I checked, this is a language where infinite loops are possible in a general sense, and it's counter-intuitive to me to see mystery behaviors trying to avoid them