We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cd3893 commit c12408aCopy full SHA for c12408a
1 file changed
www/notes/hustle/interp.rkt
@@ -47,7 +47,7 @@
47
(and (symbol? x)
48
(memq x '(add1 sub1 + - zero?
49
;; New for Hustle
50
- box unbox cons car cdr))))
+ box unbox empty? cons car cdr))))
51
52
;; Any -> Boolean
53
(define (value? x)
@@ -69,7 +69,8 @@
69
[(list '- (? integer? i0) (? integer? i1)) (- i0 i1)]
70
71
[(list 'box v0) (box v0)]
72
- [(list 'unbox (? box? v0)) (unbox v0)]
+ [(list 'unbox (? box? v0)) (unbox v0)]
73
+ [(list 'empty? v0) (empty? v0)]
74
[(list 'cons v0 v1) (cons v0 v1)]
75
[(list 'car (cons v0 v1)) v0]
76
[(list 'cdr (cons v0 v1)) v1]
0 commit comments