letrec

konkret:

(letrec ((n1 x1) (n2 x2)) y)
wobei n1, n2 sichtbar in x1,x2

abstrakt:

data Exp = ...
| RecursiveBinding 
    { binders :: [ Binder ] , body :: Exp }

Beispiele:

(letrec ((x (@+ 3 4)) (y (@* x x))) (@- x y))
(letrec ((f (lam x (.. (f (@- x 1)) ..)))) (f 3))



2010-10-12