I'm trying to understand how to use the isa?
function, but I don't yet understand exactly what the valid arguments of this function are, but somehow they are type-designators, or type-names, or whatever the clojure terminology for that is.
My question is: given two valid type-designators for isa?
how do I find out whether the two designated types intersect. I.e., is it possible to have an object which is of both types?
The blog post of Ambrose sort of hints at this enough to make me even more curious.
As the blog post specifies, there is no equivalent of the Common Lisp subtypep
function in clojure. But in Common Lisp I can ask whether type A is a subtype of B, and I can express intersection types as (and A B). Thus I can ask intersection questions by asking whether the intersection is a subtype of the empty type. (subtypep (and A B) nil)
What is the closest to that that exists in clojure?