Files
IBAFLang/IBAF-Tests/IBAF-1/fun.fct
2023-12-13 15:27:55 +01:00

65 lines
1.5 KiB
Plaintext

initialise-binding scope
(collateral
(bind
("a",
allocate-variable
(integers)),
bind
("test",
function abstraction
(scope
(collateral
(map
( ),
bind
("a",
allocate-initialised-variable
(integers,
checked head
given)),
give
(checked tail
given,
bind
("b",
allocate-initialised-variable
(integers,
checked head
given)))),
return int-mul
(assigned
(bound
("a")),
assigned
(bound
("b")))))),
bind
("b",
allocate-variable
(integers)),
map
( ),
map
( )),
sequential
(assign
(bound "a",
decimal-natural
("20")),
null,
assign
(bound "b",
handle-return apply
(bound "test",
cons
(decimal-natural
("6"),
list
(decimal-natural
("3"))))),
print assigned
(bound
("a")),
print assigned
(bound
("b"))))