my written-code when reading Programming Pearls.