### Returning
[
Datatype returning
Funcon returned
Funcon finalise-returning
Funcon return
Funcon handle-return
]
Meta-variables
T <: values
Datatype
returning ::= returned(_:values)
*/
Funcon finalise-returning(X:=>T) : =>T|null-type
~> finalise-abrupting(X)
*/
Funcon return(V:T) : =>empty-type
~> abrupt(returned(V))
*/
Funcon
handle-return(_:=>T) : =>T
*/
Rule
X --abrupted( )-> X′
--------------------------------------------------
handle-return(X) --abrupted( )-> handle-return(X′)
Rule
X --abrupted(returned(V:values))-> X′
----------------------------------------------
handle-return(X) --abrupted( )-> V
Rule
X --abrupted(V′:~returning)-> X′
---------------------------------------------------
handle-return(X) --abrupted(V′)-> handle-return(X′)
Rule
handle-return(V:T) ~> V
/*
`returned(V?)` is a reason for abrupt termination.