Going through the book "Pearls of functional algorithm design" by Richard Bird