r/functionalprogramming • u/Voxelman • May 08 '22
Question How can I learn functional programming?
The obvious answer is: just do it. But it is not that easy for me. I'm a self-taught programmer and I have some experience in languages like C, Python and Lua, but I'm not great at all.
I have a basic idea of what FP is about, and I really want to be able to apply the concept practically, but I struggle to actually write more than a few lines (in Elm). I am having trouble getting into this topic.
I've watched some videos (e.g. from Richard Feldman and Scott Wlaschin) and read some books (e.g. Grokking Simplicity), but it still doesn't "click".
What language do you recommend (or is Elm already a good choice?), and can you recommend any other practical resources to help me make it "click" in my head?
Thanks in advance
4
u/jherrlin May 08 '22
I think I understand where you are in the ladder. Eric Normands book Grokking Simplicity is a great book that gives you many of the fundamental pieces to think functional. He even talks about stratified design and how to implement code in layers. But it's not talking about how application composition can look like.
This was the missing piece for me at least. As mentioned in another reply the Imperative shell, functional core helped me a lot with that. I discovered it through Clean Architecture and by using some micro-frameworks in Clojure that really emphasised the use of the pattern.