Andy,
Would you share your solution? I want to do the same kind of thing. I have created a macro called
^iterateRejoinders( ^topRule ^funToExecute )
The purpose is to execute the given function against the direct descendants of the given rule, skipping all of the other rejoinders that may occur before the next official topRule.
Everything is working fine but
$$_funcall = ^join( \^ ^funToExecute \( $$_curRule \) )
^nofail( RULE ^eval( $$_funcall) )
results in
^printRule(~test-options.7.3)
rather than the output of the ^printRule function.
a trace on the code reveals:
System call ^join(`\^ ^1 \( $$_currule \)`)
.NOPROBLEM ^join(\^ ^1 \( $$_currule \)) => `^printRule(~test-options.7.3)`
$$_funcall = ^join(^printRule(~test-options.7.3))
System call ^nofail(`RULE ^eval ( $$_funcall )`)
.System call ^eval(`$$_funcall`)
..NOPROBLEM ^eval(^printRule(~test-options.7.3)) => `^printRule(~test-options.7.3)`
.NOPROBLEM ^nofail(RULE ^eval ( $$_funcall )) => `^printRule(~test-options.7.3)`