28 lines
603 B
Plaintext
28 lines
603 B
Plaintext
general {
|
|
funcon-term:
|
|
initialise-giving
|
|
initialise-binding
|
|
scope(
|
|
bind-value("x",4),
|
|
give(
|
|
99,
|
|
give(
|
|
function closure(
|
|
sequential(
|
|
print given,
|
|
print bound-value"x")),
|
|
scope(
|
|
bind-value("x",99),
|
|
apply(
|
|
sequential(print 1, given),
|
|
sequential(print 2, 3))))))
|
|
;
|
|
}
|
|
|
|
tests {
|
|
result-term: null-value;
|
|
standard-out: [1, 2, 3, 4];
|
|
//Also:
|
|
// standard-out: [2, 1, 3, 4];
|
|
}
|