[plt-scheme] Stylistic (I hope!) question regarding driver loop

From: Lauri Alanko (la at iki.fi)
Date: Sat Jan 21 14:58:37 EST 2006

On Sat, Jan 21, 2006 at 11:31:24AM -0800, Gregory Woodhouse wrote:
> (letrec
>     ((main-loop
>       (lambda ()
>               (main-loop))))))
>      (evaluate
>       (lambda (x) x)))
>   (main-loop))

This is ok (yes, it is tail-recursive), but using named let would
probably be neater:

(let main-loop ()

You can add the definition of evaluate either inside or outside the
let-expression (depending on whether it depends on main-loop or not).


Posted on the users mailing list.