Interesting 👍. I've heard the term "monad" before but never knew what it meant. I've been referring to this pattern as the "decoder" pattern or "either" pattern (and even made a typescript library implementing it).
I feel like this pattern is more commonly called something other than "monad," but I'm sure my perspective has also been biased by the search terms I've been using.
The monad name come from the math world, I think that many developers thought that this name isn't self explicit and renamed it.
If it's the case, I'm agreed with them. :)
The examples here don't cover all cases of monads, there is "array monad" or "graph monad" that helps navigate through this kind of data structure.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Interesting 👍. I've heard the term "monad" before but never knew what it meant. I've been referring to this pattern as the "decoder" pattern or "either" pattern (and even made a typescript library implementing it).
I feel like this pattern is more commonly called something other than "monad," but I'm sure my perspective has also been biased by the search terms I've been using.
Very useful description, thanks.
Thanks for your comment.
The monad name come from the math world, I think that many developers thought that this name isn't self explicit and renamed it.
If it's the case, I'm agreed with them. :)
The examples here don't cover all cases of monads, there is "array monad" or "graph monad" that helps navigate through this kind of data structure.