So the first real Scheme program that I really want Kiwi to run in TinyCLOS. And just to get started, I’ll need at least let
.
I’ve been dragging my feet on nano-expander
, so last Sunday, I thought, having read this note from Scheme from Scratch, that I can just do a quick thing inside the existing KiwiNode::compile
to transform let
s into lambda
s.
Typing in the transformation is easy enough, but when I tried to also do let*
, it dawned on me that I really do need to have a proper expander – you have to expand all let
s to lambda
s before compiling, and what I did only worked for the outer-most layer, once I have nested let
expressions, the inner let
s will already be wrapped inside the outer lambda
, without a chance to expand.
So I read up on the next stages of the scope-sets expander and I think I’m gonna merge my nano
branch as is, and just proceed to the next micro
stage. Once I have micro
ported, I can add let
and letrec
as additional core forms.