Bindings in letrec should be initialized immediately after evaluating their corresponding expression. Currently, the bindings are being initialized only after evaluating all expressions. The following example demonstrates this problem:
(compute-type
'(letrec ([f (lambda (x) 10)])
[x (f 11)])
x))
The code above should evaluate to (type-of 10) but evaluates to ⊥ instead.