Programming Pearls Sample code