May 4th, 2012

beartato phd

(no subject)

I realized that the contravariance in function subtyping --- that if A is a subtype of B, then B → C is a subtype of A → C --- is something we all encounter reasonably often in ordinary life, when we think of dietary restrictions such as vegetarianism. Here is that thought in the form of a hastily-drawn just-barely-interactive javascript mouseover toy: (click to go to demo)

I think this serves as a nice real-world anchor for the abstract concepts involved, much like the idea of drinking-age does for the Wason selection task.