[plt-scheme] Unnecessary use of letrec?

From: Grant Rettke (grettke at acm.org)
Date: Fri Jun 15 00:26:21 EDT 2007

I wrote some code:

 (letrec ([pos (file-start-position editor)]
            [loaded (load-file editor)])

where I wanted to be sure that pos gets defined before the file is
loaded. I read that letrec runs left to right, so I used that. The
defintions are not recursive.

Later I read that in DrS/mz, every kind of block runs left to right,
including let blocks.

It seems I could replace this letrec with let and be guaranteed the
same behavior?


Posted on the users mailing list.