forked from Mirror/wren
- Compile them as calls and definitions. - Use them for call(), clear(), run(), try(), and yield(). - Update the docs.
8 lines
184 B
Plaintext
8 lines
184 B
Plaintext
class Foo {
|
|
getClosure { new Fn { new Fn { new Fn { toString } } } }
|
|
toString { "Foo" }
|
|
}
|
|
|
|
var closure = (new Foo).getClosure
|
|
IO.print(closure.call().call().call()) // expect: Foo
|