codes while reading "purely functional data structures"