User loginNavigation |
doing letrec with lambdasHi there, I promise this isn't a homework assignment of some sort, but it sure feels like it should be.... I'm working on a pet language of mine, which I'm building up from a hopefully minimal intermediate language very similar to lambda-calculus. In order to map proper (potentially mutual) tail-recursion onto the lower-level implementation mechanics, I realized that I need to be able to do the moral equivalent of a letrec, but, since this's just a kernel-intermediate language, I want to avoid syntactic sugaring until higher-level intermediate forms instead, and would strongly prefer to not introduce a one-off level of complexity to hack this up. Doing "let" with lambdas is trivial enough that even I understand it, but I've gone 'round the proverbial mulberry bush with letrec, and to no avail. Would someone either have a quick answer as to how this's done, or else know of a link to a site/paper/discussion where folks do this? This really can't be as hard as it seems.... Thanks! By jimdesu at 2008-09-04 06:06 | LtU Forum | previous forum topic | next forum topic | other blogs | 18849 reads
|
Browse archives
Active forum topics |
Recent comments
1 week 1 day ago
41 weeks 3 days ago
41 weeks 3 days ago
41 weeks 3 days ago
1 year 11 weeks ago
1 year 15 weeks ago
1 year 17 weeks ago
1 year 17 weeks ago
1 year 20 weeks ago
1 year 24 weeks ago