Algorithms from Purely Functional Data Structures in Haskell