the suggested operator can be used to declare scopes.
like:

scope(s) = open-scope; s: close-scope

a : b = a < b + b; fail

if “a” fails, “b” is always executed and the failure of “a” or “b” is reported.

Submitted on 7 October 2006 at 11:15

On 8 October 2006 at 21:06 Jira commented:

STR-653, pierron:
In fact there is two kinds of ensure-seq operators:

ensure-seq operators which reports if one failed. ( :- )
i-e: scope closure.

a :- b = a < b + b; fail

ensure-seq operators which reports if one succedded. ( :+ )
i-e: innermost(s1 :+ s2 :+ s3 :+ s4)

we want to apply s1, s2, s3, s4 and report if one of them succedded.

a :+ b = a < try(b) + b


On 19 December 2006 at 20:55 Jira commented:

STR-653, martin:
After our discussion at the SUD on this issue, I think we can conclude that we should first provide useful abstractions as strategy definitions in the library. If these abstractions are very useful, but have an in convenient syntax, then they could be promoted to language features.

Log in to post comments