File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 77 "strings"
88)
99
10- const MaxRecursionDepth = 1000 // Between 1000 and 2000 is considered to be a reasonable recursion depth for recursive functions
10+ const MaxRecursionDepth = 3000 // Between 1000 and 2000 is considered to be a reasonable recursion depth for recursive functions
1111
1212type Evaluator struct {
1313 // Keep track of file path that have been imported by the import statement.
Original file line number Diff line number Diff line change 11factorial = fun(n) {
2- if n == 0 then 1
2+ if n == 0 then return = 1
33 n * factorial(n - 1)
44}
5- println(factorial(5)) # Outputs 120
5+
6+ timeBefore = millis()
7+ factorial(998)
8+ timeAfter = millis()
9+ time = timeAfter - timeBefore
10+ println(time)
611
712fibonacci = fun(n) {
813 if n <= 1 then return = n
You can’t perform that action at this time.
0 commit comments