An Array Monad in Haskell

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.

Global definitions

fromList, singleton, toList, set, get, size, contains, inverse, and trim





As a functor

array functor


As a monad

array monad







By |2016-04-22T03:29:39+00:00August 9th, 2013|Functional Programming|0 Comments

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.