[plt-scheme] Re: (newbie question) About Loop

From: Jon Rafkind (rafkind at cs.utah.edu)
Date: Fri Jun 12 02:09:26 EDT 2009

Captain___nemo wrote:
> Thanks a lot :)
> Won't it be inefficient building list for large values (say thousands
> instead of 10)? Isn't there any direct loop syntax in Scheme?
Oh yea I guess you can use the for stuff that I keep forgetting about.

(for ((i (in-range 0 10)))
     (for ((j (in-range 0 3)))
          (printf "~a\n" j))
     (printf "~a\n" i))

Posted on the users mailing list.