Purely functional data structures - Okasaki, Chris (Cambridge University Press, 1998)