
From:  Noah Lavine 
Subject:  Re: Is apply procedure not tail recursive? 
Date:  Wed, 16 Jan 2013 19:20:13 0500 
(define (zeros n)
;; Make list of n zeros
(define (zerositer n lst)
(if (= n 0)
lst
(zerositer ( n 1)
(cons 0 lst))))
(zerositer n '()))
Results:
guile> (apply + (zeros (expt 10 3)))
$2 = 0
guile> (apply + (zeros (expt 10 4)))
$3 = 0
guile> (apply + (zeros (expt 10 5)))
ERROR: Throw to key `vmerror' with args `(vmrun "VM: Stack overflow" ())'.
guile> (apply + (zeros (expt 10 6)))
Process scheme aborted (core dumped)
[Prev in Thread]  Current Thread  [Next in Thread] 