Iowa Type Theory Commute

Example of programming with indexed types: binary search trees

11 min • 16 januari 2020

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.

Senaste avsnitt

Podcastbild

00:00 -00:00
00:00 -00:00