fixed type for first & rest

original commit: df24b968c6cfeb814256523f2bda3907811a6dd0
This commit is contained in:
Matthew Flatt 1997-09-26 18:28:36 +00:00
parent 84f81ab101
commit 81b5e77831

View File

@ -180,7 +180,7 @@
(define first (polymorphic (lambda (x) (define first (polymorphic (lambda (x)
(unless (pair? x) (unless (pair? x)
(raise-type-error 'first "list" x)) (raise-type-error 'first "non-empty list" x))
(car x)))) (car x))))
(define second (polymorphic cadr)) (define second (polymorphic cadr))
(define third (polymorphic caddr)) (define third (polymorphic caddr))
@ -192,7 +192,7 @@
(define rest (polymorphic (lambda (x) (define rest (polymorphic (lambda (x)
(unless (pair? x) (unless (pair? x)
(raise-type-error 'rest "list" x)) (raise-type-error 'rest "non-empty list" x))
(cdr x)))) (cdr x))))
(define build-string (define build-string