Nice:
——————————
stratego> foo(s) = s(!2)
stratego> foo(!1)
operator s/(1,0) not defined
——————————

Ugly:
——————————
stratego> foo(s : (a -> a) -> a ) = s
stratego> foo(!2)
[ stratego-shell | error ] Evaluation of this kind of native strategy is not yet supported
StrClosure(SDefT(“foo”,[VarDec(“s”,FunType([FunType([ConstType(SortVar(“a”))],ConstType(SortVar(“a”)))],ConstType(SortVar(“a”))))],[],Scope([],CallT(SVar(“s”),[],[]))),StrEnv(SEnv([RuleScope(IndexedSet(“00000000000”),Hashtable(“00000000000”)),RuleScope(IndexedSet(“00000000000”),Hashtable(“00000000000”))]),TEnv([RuleScope(IndexedSet(“000000000004”),Hashtable(“00000000000”)),RuleScope(IndexedSet(“00000000000”),Hashtable(“00000000000”))])))
application of foo/(1,0) failed due to an internal error
command failed
——————————

Submitted on 1 March 2006 at 16:01

Log in to post comments