Solutions to exercises from Purely Functional Data Structures