Maciej Kotowicz asked about implementing binomial heaps using types to enforce the shape invariants. I dug up an old email from 1998 talking about how to do this with nested types, and posted it to my blog: http://okasaki.blogspot.com/2009/10/binomial-queues-as-nested-type.html -- Chris