What is the difference between R6RS `letrec`,` letrec * `and Racket` letrec`?

Both letrecand letrec*are R6RS, but there only letrec in Racket, the no letrec*. What are the differences between the two?

+4
source share
1 answer

In short, Racket letrecand R6RS letrec*are the same. For them, the assessment procedure is indicated. R5RS letrecdoes not specify an order.

Since the order of R5RS is letrecnot specified, the implementation can choose a fixed order (for example, from left to right), or they can allow the compiler to choose different orders for each use (to get a faster code).

From the racquet documentation.

R5RS letrec:

: variable > s undefined, <init> s ( ), < > <init> , < > (-) <body> () . <variable> letrec , .

Racket letrec:

, - val-exprs, # undefined > , val-exprs, bodys, id val-expr. ids bound-identifier =?.

R6RS letrec*:

: > s , <variable> <init> , <body> < > . , <variable> letrec * , .

+7

All Articles