Christophe Rhodes <csr21@...> writes:
> Nice catch, but I think we can do even slightly better than that.
> (deftype foo () '(satisfies even-and-greater-than-two-p))
> (deftype bar () '(satisfies sum-of-two-primes-p))
> (type= 'foo 'bar)
> should be NIL, NIL (unless someone's proved or disproved Goldbach's
> conjecture while I wasn't looking). But
> (type= '(cons foo integer) '(cons bar symbol))
> should be NIL, T, even though there's ambiguity in the CAR.
Unfortunately not so, as both FOO and BAR may turn out to be
the empty type, in which case the whole CONS type is really
the NIL type.
Took a while to figure that one out -- not eased by the rather
hairy test-case that happened to catch it. ;-)
-- Nikodemus Schemer: "Buddha is small, clean, and serious."
Lispnik: "Buddha is big, has hairy armpits, and laughs."
Get latest updates about Open Source Projects, Conferences and News.