Jim Newton
3/17/2016 9:42:00 AM
> > CL-USER> (subtypep '(function (nil) nil) nil)
> > NIL
> > T
> > CL-USER> (subtypep '(function (nil) t) nil)
> > NIL
> > T
> > CL-USER> (subtypep '(function (t) nil) nil)
> > NIL
> > T
>
> Of course, every type is a supertype of nil, including nil itself.
> There can be no exception to this, so there is no reason not
> to give an authoritative answer.
>
No, what I mean is the following: Is (function (nil) nil)
a SUBTYPE of nil? Of course nil is a subtype of (function (nil) nil), but
my question is the other way around. My gut feel is that (subtypep (function (nil) nil) nil)
should return T,T in this case. Why? Because the set of functions which
this type signature is the empty set.
> > If there is such a function, I'm very curious to understand what it is.
>
> Such a function as what? That is not a supertype of nil?
I mean, is there a function which accepts and argument coming from the empty set.
I think the answer is no. If that is the case, it seems to me that
(function (nil) nil) specifies a subtype of nil.
If this is not the case there is probably something curious and interesting about function
types that I would like to better understand.