Functions take a set number of arguments

This commit is contained in:
2022-08-26 12:48:10 +01:00
parent f36289786e
commit 7bd67765aa
6 changed files with 72 additions and 58 deletions

View File

@@ -19,13 +19,12 @@ DONE: functions are invoked by calling their names
DONE: function arguments can have specified types
DONE: function returns can have specified types
DONE: closures are explicitly supported
DONE: functions are first-class citizens
DONE: functions take a set number of parameters
TODO: functions take a set number of parameters
TODO: functions can return a set number of values
TODO: functions are first-class citizens
TODO: functions return a set number of values
TODO: functions last argument can be a rest parameter
TODO: check for wrong number of function parameters
TODO: Nullish types
TODO: A way to check the type of a variable (typeOf keyword)

View File

@@ -275,7 +275,7 @@ fn doSomething() {
}
```
Functions can take a number of parameters within the parenthesis following their names, and can return a number of values to the calling context using the return keyword.
Functions can take a set number of parameters within the parenthesis following their names, and can return a number of values to the calling context using the return keyword.
```
fn reverseOrder(a, b, c) { //return type isn't required by default