file: 01-C-event.t package: muf status: alpha
This function accepts a symbol naming a restart, or else a
restart identifier, which must have been obtained from
getNthRestart
, either directly or indirectly (as
via findRestart
) and invokes it. In the current
implementation, the restart function must neither accept nor
return arguments.
The invokeRestart
function returns only if the
restart function itself returns -- many will do a
goto
to some suitable tag.
This function is currently implemented as
: invokeRestart { $ -> ! } -> restart restart symbol? if restart nil findRestart -> restart fi restart getRestart -> name -> fn -> tFn -> iFn -> rFn -> data -> id fn call{ -> } ; 'invokeRestart export
A matching function ]invokeRestart
is provided for
restarts which take as argument a single block.
This function is currently implemented as
: ]invokeRestart { [] $ -> ! } -> restart restart symbol? if restart nil findRestart -> restart fi restart getRestart -> name -> fn -> tFn -> iFn -> rFn -> data -> id fn call{ [] -> } ; ']invokeRestart export
If you use restarts with other arities, you may wish to write yourself an appropriate variant of the above functions.
Go to the first, previous, next, last section, table of contents.