Add clever comments.

This commit is contained in:
Sam Tobin-Hochstadt 2011-04-19 18:30:19 -04:00
parent eaa63f2d1e
commit 6c17b01f99
2 changed files with 3 additions and 1 deletions

View File

@ -62,6 +62,7 @@
(foldr -pair b l))
(define (untuple t)
;; FIXME - do we really need resolution here?
(match (resolve t)
[(Value: '()) null]
[(Pair: a b) (cond [(untuple b) => (lambda (l) (cons a l))]

View File

@ -39,7 +39,8 @@
(let ([types (remove-dups (sort (apply append (map flat args)) type<?))])
(cond
[(null? types) (make-union* null)]
[(null? (cdr types)) (car types)]
[(null? (cdr types)) (car types)]
;; FIXME: this sort is unneccessary
[else (make-union* (sort (foldr union2 '() (remove-subtypes types)) type<?))]))]))
(define (u-maker args) (apply Un args))