This thread is for everyone who uses functional programming in their day to day life and have gone through the struggle of building mental models about functional way of doing things.
I am not looking for a guide to learn haskell syntax and any other programming syntax. I am looking for how to really learn functional programming how to build the mental models in order to think functionally. So that even if a language is not functional by nature, I can model my functions and data in functional way of building programs.
I myself write JS and Typescript for living and i came across this library https://github.com/gcanti/fp-ts
But not even 1% of this library make sense to me. So if anyone of you have gone through the struggle and overcome it and using fp in your code. Please share the knowledge to fellow learner.
Thanks <3 !!
Its tricky because these are patterns that are familiar in Haskell but are not really taught in other settings.
Additionally, to really learn these, you need to experiment with them. Use them. etc. That's pretty hard to do if the learning resources are mostly in haskell and you don't really understand it.
Alternatively, this might help: https://github.com/MostlyAdequate/mostly-adequate-guide
Also alternatively, what I would do is just go slowly through the fp-ts code. Look at it a piece at a time and slowly grow your understanding.
This may also help https://www.amazon.com/Domain-Modeling-Made-Functional-Domai...
I think working with immutable data structures is the key to functional programming. It leads to writing more pure functions and changes your thinking about software architecture.
I'd recommend learning Haskell in your free time. It's a major paradigm shift but once it clicks you'll find it a lot easier to translate those concepts into fp-ts.
I went through this journey a couple of years ago, and now write heavy fp-ts code full-time - including maintaining fp-ts-std[1] - as well as some paid Haskell gigs on the side. Do feel free to reach out if you want any guidance at all, you'll find my email on my personal site[2]. The FP Slack is also a great place to ask for help with anything FP, including fp-ts - if you send me an email I can have an invitation sent to you.
[1]: https://github.com/samhh/fp-ts-std [2]: https://samhh.com