// not persistable sclass Attractor implements IAttractor, Runnable { F1 tester; Runnable action; S input; // when matched *() {} *(F1 *tester, Runnable *action) {} *(Runnable *action) {} public bool matches(ExtS s) { ret matches(s!); } public bool matches(S s) { ret isTrue(callF(tester, s)); } public void run { callF(action); } toString { ret standard_toString(this); } public bool matches_public(ExtS s) { input = s!; ret matches(s); } public bool matches_public(S s) { input = s; ret matches(s); } } sclass DefaultAttractor > Attractor { *() { this(null); } *(Runnable *action) { tester = f1_true(); } } sclass MatchAttractor > Attractor { S pattern; *() {} *(S *pattern) {} *(S *pattern, Runnable *action) {} public bool matches(S s) { ret matchX2(pattern, s); } }