Solving Bird's _Pearls of functional algorithm design_