Code Comments
Programming Forum and web based access to our favorite programming groups.I noticed in the revised progress report on R6RS (http://schemers.org/Documents/Stand.../2004-10-13.pdf), one of the extensions under consideration is to "add letrec*, and define internal =define= in terms of it". What is letrec* ? Is it simply a letrec with the init expressions evaluated in a specific left-to-right order? In a letrec*, can later variables depend on the values of earlier values? For example, with internal =define='s defined with letrec*, would the following work or not? (let () (define (add-10 x) (+ x 10)) (define ten (add-10 0)) (define twenty (add-10 ten)) (list ten twenty)) Thank you, Andrew Wilcox email: scheme[at]andrewwilcox.name
Post Follow-up to this message>>>>> "Andrew" == Andrew Wilcox <scheme@andrewwilcox.name> writes: Andrew> What is letrec* ? Is it simply a letrec with the init expressions Andrew> evaluated in a specific left-to-right order? Yes. Andrew> In a letrec*, can later variables depend on the values of earlier Andrew> values? Yes. Andrew> For example, with internal =define='s defined with letrec*, Andrew> would the following work or not? Andrew> (let () Andrew> (define (add-10 x) (+ x 10)) Andrew> (define ten (add-10 0)) Andrew> (define twenty (add-10 ten)) Andrew> (list ten twenty)) Yes. -- Cheers =8-} Mike Friede, Völkerverständigung und überhaupt blabla
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.