cons/nil for pair/unit in scheme backend
Some checks failed
Publish Playground / build (push) Has been cancelled
Publish Playground / deploy (push) Has been cancelled

This commit is contained in:
2026-03-18 17:28:58 -07:00
parent 5eb43f6252
commit cfdddbb002
4 changed files with 11 additions and 15 deletions

View File

@@ -1,9 +1,8 @@
;; REVIEW all of this - some of it is IO and needs the IO dance
;; maybe we make a helper? A macro?
(define $Nil (lambda (nm-0) (vector 0 nm-0)))
(define $Cons (lambda (nm-0 nm-1 nm-2) (vector 1 nm-0 nm-1 nm-2)))
(define $IORes (lambda (nm-1 nm-2) (vector 0 #f nm-1 nm-2)))
; (define $IORes (lambda (nm-1 nm-2) (vector 0 #f nm-1 nm-2)))
(define $IORes (lambda (nm-1 nm-2) (cons nm-1 nm-2)))
(define ($Left x) (vector 0 #f #f x))
(define ($Right x) (vector 1 #f #f x))
(define $LT 0)