This is an implementation of an array—using a size-balanced binary search tree under the hood—for a course in programming languages this summer. Some functions may look awkward as they are based on catamorphisms.
fromList, singleton, toList, set, get, size, contains, inverse, and trim
As a functor
As a monad