Found in 4 comments on Hacker News
So, this is going to be an uphill battle for you. I suggest you actually learn Haskell first, and then you'll be able to apply its lessons to TypeScript.

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...

mdm12 · 2021-02-15 · Original thread
Speaking of domain-driven design, the author of this article wrote a great book called 'Domain Modeling Made Functional', which I heartily recommend (even if you don't have a specific interest in learning F#) https://www.amazon.com/Domain-Modeling-Made-Functional-Domai...
I like your approach to problem solving - it's very similar to mine and in domains I also think about.

Your syntax is very convenient thanks for sharing.

And finally, I assume you're familiar with Scott Wlashin (of F# for fun and profit & "Domain Modeling Made Functional")[1][2]. If not you 100% should read it as it is right up your alley. It's the intersection of Functional Programing and DDD/EIP. (I have no affiliation).

[1] https://fsharpforfunandprofit.com/ddd/

[2] https://www.amazon.com/Domain-Modeling-Made-Functional-Domai...

[3] https://fsharpforfunandprofit.com/rop/ (Railway oriented programming)

So I didn't include it in the original link, but he has a book he wrote under the same title (Domain Modeling Made Functional). I've been going through it now. It's a much more in-depth treatment of the same topics. He walks through a small product from start to finish.

Additionally he does a really great job of walking through two things that I don't think are covered well enough at all for beginning and intermediate programmers (and even experienced ones like myself may have missed parts of along the way).

1. How to effectively gather customer requirements, what questions to ask, what things to dig into, how to organize them. A simple walk through, better than the hand-wavy stuff most people do when requirements gathering.

2. How to model a domain / problem space before implementing. How to effectively reason about your entities, services and actions. And iterate on these with your customer before coding.

I seriously wish I had run across this when I first started coding. A really great collection of tangible, actionable advice.

I've never done it in javascript so won't try to guess, but the first two parts of the three part book are really applicable regardless of the language. Will have to finish the third to see how it is.

Domain Modeling Made Functional - Scott Wlaschin

  https://pragprog.com/book/swdddf/domain-modeling-made-functional    https://www.amazon.com/Domain-Modeling-Made-Functional-Domain-Driven/dp/1680502549 
(I have zero affiliation with the author and get nothing from any links)

His blog https://fsharpforfunandprofit.com/