\(\textit{Purely Functional Data Structures}\) (1999) by Chris #Okasaki is a 💎.

All popular algorithms and data structures textbooks, including my favourite, the venerable #CLRS, are decidedly #imperative. The more a book leans toward the practical, the more blatantly imperative it gets.

But #Okasaki's book, the only one of its kind that I'm aware, is markedly different. It's functional—purely #functional. It's written in #StandardML, my favourite #programming language. It also includes #Haskell implementations in the appendix. The writing style is typical #CS—clear, concise, cogent.

I never got to teach from it, since it came out well after I escaped academia. But I heartily recommend serious CS students to study it, especially those with an unhealthy FP obsession. Experienced #FP programmers should read it, too. And FP novices must read it.

https://www.amazon.com/Purely-Functional-Data-Structures-Okasaki/dp/0521663504/ref=sr_1_1?crid=3ENNO0AYGXFGO&keywords=purely+functional+data+structures&qid=1691546864&sprefix=purely+functional+%2Caps%2C184&sr=8-1&ufe=app_do%3Aamzn1.fos.18ed3cb5-28d5-4975-8bc7-93deae8f9840

Amazon.com