For Programmers: Free Programming Magazines  


Home > Archive > Scheme > September 2006 > how do I convert a letrec to a nested let?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how do I convert a letrec to a nested let?
TheGist

2006-09-19, 7:04 pm

I wrote the following to convert a let to the appropriate lambdas.
(define (let->lambda exp)
(let
((vars (map car (cadr exp)))
(vals (map cadr (cadr exp)))
(body (caddr exp)))
(cons (list 'lambda vars body) vals)
)
)
Now, I am having a very hard time doing a similar trick for
letrec(well, and let* too ;)
Can anyone here shed some light on a good approach to take with this?
Thanks!
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com