Example of programming with indexed types: binary search trees

16/01/2020 10 min Temporada 1 Episodio 29
Example of programming with indexed types: binary search trees

Listen "Example of programming with indexed types: binary search trees"

Episode Synopsis

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.