add t/tailcall.scm
This commit is contained in:
parent
76ec63d1ca
commit
de5ad2a228
|
@ -0,0 +1,6 @@
|
|||
(define (sum k acc)
|
||||
(if (zero? k)
|
||||
acc
|
||||
(sum (- k 1) (+ k acc))))
|
||||
|
||||
(display (sum 1000 0))
|
Loading…
Reference in New Issue