microscheme icon indicating copy to clipboard operation
microscheme copied to clipboard

Add let*

Open glv2 opened this issue 3 years ago • 0 comments

This adds support for the let* form to Microscheme by turning:

(let* ((x (f ...))
       (y (g x ...))
       (z (h x y ...)))
  body)

into:

((lambda (x)
   ((lambda (y)
     ((lambda (z)
         body)
      (h x y ...))
    (g x ...))
 (f ...))

It seems to be working fine, and the generated assembly looks similar to what is generated for let. However I don't know if there is a way to have a higher level view of what is generated. For example, seeing the final AST generated by the parser would help detect possible issues or optimizations.

glv2 avatar Nov 07 '21 13:11 glv2