CONT signature
signature CONT
structure Cont : CONT
type 'a cont
val callcc : ('a cont -> 'a) -> 'a
val throw : 'a cont -> 'a -> 'b
val isolate : ('a -> unit) -> 'a cont
type 'a control_cont
val capture : ('a control_cont -> 'a) -> 'a
val escape : 'a control_cont -> 'a -> 'b
type 'a cont
'a
callcc f
x, it is as if (callcc f) had returned x as a result.
throw k a
isolate f x
f(x) before exit().
type 'a control_cont
'a. Unlike an ordinary continuation cont, a control_cont does not remember the exception-handler of its creator.
capture f
x, it is as if (capture f) had returned x as a result, except that the exception-handler is not properly restored (it is still that of the invoker).
escape k a
Last Modified October 28, 1997
Comments to sml-nj@research.bell-labs.com
Copyright © 1998 Bell Labs, Lucent Technologies