able-script/examples/lambda.able

18 lines
228 B
Plaintext
Raw Normal View History

dim with_world λ (var) {
var + /*world!*/ =: var;
};
dim foo /*Hello, */;
with_world(foo);
foo print;
2022-04-18 19:04:04 -05:00
functio add1(var) {
1 + var =: var;
}
dim bar 0;
(add1 * λ () { /*Goodbye, world!*/ print; })(bar);
bar print;