Example of programming with indexed types: binary search trees

Published: Jan. 16, 2020, 11 p.m.

b'

Using indexed types, we can restrict the form of legal values in some datatype.\\xa0 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.

'