Heap written on haskell (functional programming course)