[plt-scheme] [swindle] dotimes 'bug'

From: David Hansen (david.hansen at gmx.net)
Date: Fri Jul 28 09:18:33 EDT 2006

Hello,

sorry if this is the wrong list but i haven't found a better
group on gmane.

The upper bound of swindles `dotimes' macro is evaluated each
iteration:

> (dotimes (i (begin (display "xxx") 10)) (display i))
xxx0xxx1xxx2xxx3xxx4xxx5xxx6xxx7xxx8xxx9xxx


This does not happen in e.g. Emacs Lisp or SBCL (and i guess
most users wouldn't suspect this behavior and it's not
documented).  So i would call it a bug.

David



Posted on the users mailing list.