Using indexed types, we can restrict the form of legal values in some datatype. A nice example is binary search trees, where we can statically enforce the binary search tree property using an indexed type bst l u, where l is a lower bound and u an upper bound on the data stored in the tree.
En liten tjänst av I'm With Friends. Finns även på engelska.