Revert "Remove explicit tags for scheme-number"
This reverts commit e551568002
.
This commit is contained in:
parent
d1dc5c94a9
commit
5f4499fdb1
10
2_78.rkt
10
2_78.rkt
|
@ -141,14 +141,17 @@
|
|||
|
||||
|
||||
(define (attach-tag type-tag contents)
|
||||
(cons type-tag contents))
|
||||
(cond ((number? contents) contents)
|
||||
(else (cons type-tag contents))))
|
||||
|
||||
(define (type-tag datum)
|
||||
(cond ((pair? datum) (car datum))
|
||||
(cond ((number? datum) 'scheme-number)
|
||||
((pair? datum) (car datum))
|
||||
(else (error "Bad tagged datum -- TYPE-TAG" datum))))
|
||||
|
||||
(define (contents datum)
|
||||
(cond ((pair? datum) (cdr datum))
|
||||
(cond ((number? datum) datum)
|
||||
((pair? datum) (cdr datum))
|
||||
(else (error "Bad tagged datum -- CONTENTS" datum))))
|
||||
|
||||
(define type-tagged? pair?)
|
||||
|
@ -621,7 +624,6 @@
|
|||
(install-polynomial-package)
|
||||
|
||||
|
||||
|
||||
;; Coercion
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue