aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README14
1 files changed, 14 insertions, 0 deletions
diff --git a/README b/README
index 91b3fb6..473146c 100644
--- a/README
+++ b/README
@@ -61,3 +61,17 @@ Portuguese or ‘Όρυξ’ in Greek) as opposed to using the English name.
x: int = 69;
y: i64 = x; /* Compile-time error */
}
+
+7. Nested functions are supported, but not closures. Closures will
+ never be supported in the language.
+
+ /* Recall that constants (including functions!) can be declared
+ in any order. This lets us define Inner *after* it gets
+ called by the assignment to ‘x’. */
+ Outer :: () {
+ x := Inner(5);
+
+ Inner :: (x: int) int {
+ return x;
+ }
+ }