funcons-simple-0.1.0.3: tests/Kexceptions/Kexceptions11.fct
initialise-binding initialise-storing initialise-giving finalise-failing finalise-throwing scope
(collateral (bind
("i",
allocate-variable (values)),
bind
("j",
allocate-variable (values)),
bind
("main",
allocate-variable (functions
(tuples ((values)*),
values)))),
sequential (null,
null,
assign
(bound ("main"),
function closure (scope
(match
(given,
tuple ()),
handle-return (sequential
(effect (give
(decimal-natural ("0"),
sequential
(assign
(bound ("i"),
given),
given))),
while
(is-less-or-equal
(give
(bound ("i"),
sequential
(assign
(given,
integer-add
(assigned (given),
1)),
assigned (given))),
decimal-natural ("3")),
print (assigned (bound ("i")),
" ")),
handle-thrown
(sequential
(throw (give
(decimal-natural ("1"),
sequential
(assign
(bound ("j"),
given),
given))),
effect (give
(decimal-natural ("10"),
sequential
(assign
(bound ("i"),
given),
given))),
print (assigned (bound ("i")))),
scope
(bind
("j",
allocate-initialised-variable
(values,
given)),
sequential
(effect (give
(decimal-natural ("20"),
sequential
(assign
(bound ("i"),
given),
given))),
print (assigned (bound ("i")),
" ")))),
effect (give
(decimal-natural ("15"),
sequential
(assign
(bound ("i"),
given),
given))),
print (assigned (bound ("i")),
"\n")))))),
apply
(assigned (bound ("main")),
tuple ())))