funcons-simple-0.1.0.3: tests/Basic/Basic14.fct
initialise-binding initialise-storing initialise-giving finalise-failing finalise-throwing scope
(collateral (bind
("main",
allocate-variable (functions
(tuples ((values)*),
values)))),
sequential (assign
(bound ("main"),
function closure (scope
(match
(given,
tuple ()),
handle-return (scope
(bind
("x",
allocate-initialised-variable
(values,
decimal-natural ("0"))),
sequential
(while
(is-less
(assigned (bound ("x")),
decimal-natural ("5")),
sequential
(print (assigned (bound ("x"))),
effect (give
(bound ("x"),
sequential
(assign
(given,
integer-add
(assigned (given),
1)),
assigned (given)))))),
print ("done"))))))),
apply
(assigned (bound ("main")),
tuple ())))