Solutions to pearls of functional algorithm design