aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com>2022-02-28 16:56:08 +0100
committerGitHub <noreply@github.com>2022-02-28 16:56:08 +0100
commit987f0266c7b827e2a41a717988925de73dfd072b (patch)
tree4d0567d8b4d0157948b6b7b3ad3a756e1c685103
parentc24bf465305a202d0165c3a9231fcc6f63263d27 (diff)
downloaduwu-lang-987f0266c7b827e2a41a717988925de73dfd072b.tar.xz
Document lazy evaluation
-rw-r--r--doc/syntax.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/syntax.md b/doc/syntax.md
index f87b279..e7b8e43 100644
--- a/doc/syntax.md
+++ b/doc/syntax.md
@@ -31,7 +31,7 @@ string literal
- Function reference: `&function_name`
- Function call: `function_name(args)` or just `function_name`, where args is a comma-separated list of expressions.
-**Important:** When passing arguments to a function, these arguments are not passed directly as values, but rather as expressions. Each argument is evaulated as the called function accesses it. This means that you can have constructs that would cause infinite recursion in other languages - a good example for a usecase of that are conditions: `bool.if(condition, if_true, else)` is just a regular function from the standard library. `if_true` is only evaluated if condition is truey, meaning that if condition is falsey and `if_true` is a function call, that function will not be called.
+**Important:** UwU is based on lazy evaluation. This means that when passing arguments to a function, these arguments are not passed directly as values, but rather as expressions. Each argument is evaulated as the called function accesses it. This means that you can have constructs that would cause infinite recursion in other languages - a good example for a usecase of that are conditions: `bool.if(condition, if_true, else)` is just a regular function from the standard library. `if_true` is only evaluated if condition is truey, meaning that if condition is falsey and `if_true` is a function call, that function will not be called.
Function name syntax: