There are large number of texts on data structures, and libraries of data structures code. I understand that purely functional data structure is easier to reason about. Howe
Erlang programs use purely functional data structures almost exclusively, and they reap substantial benefits by scaling almost seamlessly to multiple cores. Because shared data (mainly binaries and bit strings) is never modified, there is never a need to lock such data.