I do not know a single book that will teach us how to translate OOP constructs into functional ones. Just give yourself time and you will understand functional idioms.
Do not try to match the OOP code and the FP code. The best way to learn a language (spoken language) is to immerse yourself in it and think about it. The same goes for programming languages.
Three years ago, I started learning Clojure. At that time, I don’t even know what Lisp is and what functional programming languages are. I said: “Ah? Really, what is it? Can I do something useful with Lisp? I read a lot, studied a lot and even better, I got a job at Clojure!
Now programming in functional languages seems natural to me, it makes sense. Programming in data structures and functions is all I need. Simplicity!
One thing to keep in mind is that functional programming languages are not difficult by default, and OOP languages are not easy by default.
source share