add t/tailcall.scm

This commit is contained in:
Yuichi Nishiwaki 2013-10-30 10:06:59 +09:00
parent 76ec63d1ca
commit de5ad2a228
1 changed files with 6 additions and 0 deletions

6
t/tailcall.scm Normal file
View File

@ -0,0 +1,6 @@
(define (sum k acc)
(if (zero? k)
acc
(sum (- k 1) (+ k acc))))
(display (sum 1000 0))