forked from AbleScript/ablescript
add another lambda example
This commit is contained in:
parent
c69216082e
commit
37fd7bc9e1
|
@ -5,3 +5,13 @@ dim with_world λ (var) {
|
||||||
dim foo /*Hello, */;
|
dim foo /*Hello, */;
|
||||||
with_world(foo);
|
with_world(foo);
|
||||||
foo print;
|
foo print;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
functio add1(var) {
|
||||||
|
1 + var =: var;
|
||||||
|
}
|
||||||
|
|
||||||
|
dim bar 0;
|
||||||
|
(add1 * λ () { /*Goodbye, world!*/ print; })(bar);
|
||||||
|
bar print;
|
||||||
|
|
Loading…
Reference in a new issue