language: prelude and internal functions, and varargs support

This commit is contained in:
2023-09-10 19:27:59 -04:00
parent 1cfb197a7f
commit e8c984f2dc
24 changed files with 166 additions and 104 deletions

View File

@ -5,11 +5,11 @@ A work-in-progress programming language.
```pork
/* fibonacci sequence */
func fib(n) {
if n == 0
then 0
else if n == 1
then 1
else fib(n - 1) + fib(n - 2)
if n < 2 {
n
} else {
fib(n - 1) + fib(n - 2)
}
}
func main() {