
((wrap (vau root_env (quote)
((wrap (vau (let1)
(let1 lambda (vau se (p b1) (wrap (eval (array vau p b1) se)))
(let1 current-env (vau de () de)
(let1 cons (lambda (h t) (concat (array h) t))
(let1 Y (lambda (f3)
    ((lambda (x1) (x1 x1))
     (lambda (x2) (f3 (lambda (& y) (lapply (x2 x2) y))))))
(let1 vY (lambda (f)
    ((lambda (x3) (x3 x3))
     (lambda (x4) (f (vau de1 (& y) (vapply (x4 x4) y de1))))))
(let1 let (vY (lambda (recurse) (vau de2 (vs b) (cond (= (len vs) 0) (eval b de2)
                                                     true           (vapply let1 (array (idx vs 0) (idx vs 1) (array recurse (slice vs 2 -1) b)) de2)))))
 (let (
        
        ; bitwise left rotate
        leftrotate (lambda (i shift_amt)
            ; Rotate i left by shift amt
            (bor (<< i shift_amt) (>> i (- 32 shift_amt))) 
        )
                
         monad  (array 'write  1 "enter int to left rotate: " (vau (written code)
                  (array 'read 0 60 (vau (num code)
                   (array 'write  1 "enter rotate amount: " (vau (written code)
                    (array 'read 0 60 (vau (amount code)
                     (array 'write 1 (concat (str (leftrotate (read-string num) (read-string amount))) "\n") (vau (written code)
                            (array 'exit 0)
                     ))))))))))
 ) monad)
; end of all lets
))))))
; impl of let1
)) (vau de (s v b) (eval (array (array wrap (array vau (array s) b)) v) de)))
; impl of quote
)) (vau (x5) x5))
