From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chusslove Illich Newsgroups: gmane.lisp.guile.user Subject: Re: stack overflow problem Date: Sun, 5 Feb 2006 00:03:25 +0100 Message-ID: <200602050003.31442.caslav.ilic@gmx.net> References: <87slqzl7hv.fsf@www.williamxu.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0767203909==" X-Trace: sea.gmane.org 1139105681 2804 80.91.229.2 (5 Feb 2006 02:14:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 5 Feb 2006 02:14:41 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Feb 05 03:14:39 2006 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F5ZQC-0000uo-0N for guile-user@m.gmane.org; Sun, 05 Feb 2006 03:14:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F5ZTP-0007nR-VC for guile-user@m.gmane.org; Sat, 04 Feb 2006 21:17:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F5Ws0-0007C0-53 for guile-user@gnu.org; Sat, 04 Feb 2006 18:31:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F5Wf5-00048p-IE for guile-user@gnu.org; Sat, 04 Feb 2006 18:17:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F5WUo-0001EG-Vg for guile-user@gnu.org; Sat, 04 Feb 2006 18:07:11 -0500 Original-Received: from [213.165.64.21] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1F5WU5-0008Kc-NI for guile-user@gnu.org; Sat, 04 Feb 2006 18:06:26 -0500 Original-Received: (qmail invoked by alias); 04 Feb 2006 23:03:48 -0000 Original-Received: from faust104.lstm.uni-erlangen.de (EHLO faust104.lstm.uni-erlangen.de) [131.188.98.104] by mail.gmx.net (mp032) with SMTP; 05 Feb 2006 00:03:48 +0100 X-Authenticated: #22236324 Original-To: guile-user@gnu.org User-Agent: KMail/1.8.3 In-Reply-To: <87slqzl7hv.fsf@www.williamxu.com> X-Face: %CSHGu8'aK8v?c~:ptaey=Y1q2|:\ADASJ671-0&Aijllr:}8Fp5F}7t:2$DS`E&|; B-n<=?utf-8?q?=0A=09=23=7E=25REu0D=3AbU?=,V_RY#.<4Td=hrp^X`&ZyRXu_SEA#m!o->T?Dh List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:5128 Archived-At: --===============0767203909== Content-Type: multipart/signed; boundary="nextPart36755458.nb9jZblKxs"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart36755458.nb9jZblKxs Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > [: William Xu :] > Might be a bug? (i also tested this on mzscheme, and works fine.) > > Guile version: 1.6.7, debian unstable. Same Debian, same Guile, same effect. I guess stack has to go at one point= =20 or another, and it is anyway a better idea to use tail recursion: (define (enumerate-interval low high) (letrec ((helper (lambda (low high seq) (if (> low high) seq (helper low (1- high) (cons high seq)))))) (helper low high '()))) =2D-=20 Chusslove Illich (=D0=A7=D0=B0=D1=81=D0=BB=D0=B0=D0=B2 =D0=98=D0=BB=D0=B8= =D1=9B) --nextPart36755458.nb9jZblKxs Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBD5TLDMSGXgigGr3ERAnd/AJ9Dr15mvdvz58LoHkxXMROlc5WDcgCgkRB/ Kjdh0AYqlLIJ++0B2WNRppc= =Mz6w -----END PGP SIGNATURE----- --nextPart36755458.nb9jZblKxs-- --===============0767203909== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user --===============0767203909==--