01: package jsint;
02:
03: /**
04: A continuation.
05:
06: @author Peter Norvig, Copyright 1998, peter@norvig.com, <a
07: href="license.txt">license</a> subsequently modified by Jscheme
08: project members licensed under zlib licence (see license.txt)
09: */
10:
11: public class Continuation extends Procedure {
12:
13: RuntimeException cc;
14: public Object value;
15:
16: public Continuation(RuntimeException cc) {
17: super (1, 1);
18: this .cc = cc;
19: }
20:
21: public Object apply(Object[] args) {
22: value = args[0];
23: throw cc;
24: }
25: }
|