Codes while reading "Pearls of Functional Algorithm Design"