unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: "Kjetil S. Matheussen" <k.s.matheussen@notam02.no>
Cc: guile-devel@gnu.org
Subject: Re: [CM] funny scheme code (fwd)
Date: Fri, 24 Jul 2009 00:19:41 +0200	[thread overview]
Message-ID: <m33a8nf3eq.fsf@pobox.com> (raw)
In-Reply-To: <Pine.LNX.4.64-L.0907202109230.27429@ben.ifi.uio.no> (Kjetil S. Matheussen's message of "Mon, 20 Jul 2009 21:09:40 +0200 (CEST)")

On Mon 20 Jul 2009 21:09, "Kjetil S. Matheussen" <k.s.matheussen@notam02.no> writes:

> On Mon, 20 Jul 2009, Bill Schottstaedt wrote:
>
>> For some reason, this code strikes me as funny:
>>
>> (let ((j (lambda () 0))
>> 	(k 0))
>>  (do ((i (j) (j))
>> 	  (j (lambda () 1) (lambda () (+ i 1))))
>>          ((= i 3) k)
>>     (set! k (+ k i))))

I get an endless loop here, at least with the VM. But I will have to
admit that I never did understand `do' ;-)

Andy
-- 
http://wingolog.org/




      parent reply	other threads:[~2009-07-23 22:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-20 19:09 [CM] funny scheme code (fwd) Kjetil S. Matheussen
2009-07-22 10:42 ` Segfault with do (Re: [CM] funny scheme code (fwd)) Kjetil S. Matheussen
2009-07-22 11:59   ` Ludovic Courtès
2009-07-23 22:19 ` Andy Wingo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m33a8nf3eq.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=guile-devel@gnu.org \
    --cc=k.s.matheussen@notam02.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).