!752 sS suckerID = "#1004698"; static interface Algorithm { S predict(int max); void feed(S s); } // simple test algorithm sclass TestAlgo implements Algorithm { char c; public S predict(int max) { ret str(c); } public void feed(S s) { c = last(s); } } static O sucker; p { sucker = run(suckerID); testAlgo(new TestAlgo); } static void testAlgo(Algorithm algo) { ping(); Class intrface = getClass(sucker, "main$Algorithm"); assertNotNull("main$Algorithm", intrface); O proxy = proxy(intrface, algo); double score = cast call(sucker, "scoreAlgorithm", proxy); print("Score for \* algo */: \* formatDouble(score, 3) */"); S predicted = str(getOpt(sucker, "buf")); print("==="); print(substring(predicted, 0, 1000)); print("==="); }