From 3e4ed82dc4f7c4d99214401ba31ea2b44464654a Mon Sep 17 00:00:00 2001 From: Daniel M Date: Fri, 11 Feb 2022 13:04:45 +0100 Subject: [PATCH] Update README --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index adffd6c..bd1c0d3 100644 --- a/README.md +++ b/README.md @@ -250,6 +250,11 @@ print var_in_inner_scope; - Variables from the outer scope are shadowed by parameters with the same name - The `return` keyword can be used to return a value from the function and exit it immediately - If no return is specified, a `void` value is returned +- Functions can only be defined at the top-level. So defining a function inside of any other scoped + block (like inside another function, if, loop, ...) is invalid +- Functions can only be used after definition and there is no forward declaration right now +- However a function can be called recursively inside of itself +- Functions can't be redefined, so defining a function with an existing name is invalid ``` fun add_maybe(a, b) { if a < 100 {