Add "def" syntax sugar for named function definitions.

This is technically redundant but it makes functional/procedural code
look a *lot* more natural.
This commit is contained in:
Bob Nystrom
2015-12-01 08:05:46 -08:00
parent c3e2f17758
commit 10f149f359
27 changed files with 178 additions and 64 deletions

View File

@ -1,4 +1,4 @@
var fn = Fn.new {
def fn() {
System.print(a)
System.print(b)
}

View File

@ -1,4 +1,4 @@
var f = Fn.new {
def f() {
System.print(variable)
}