I recently have tried to understand what monad is.
Although I watched lots of posts and videos which explains what monad is and what category theory is, because it is too abstract I cant fully understand it. So
Can I have a useful example of monad??
I recently have tried to understand what monad is.
Although I watched lots of posts and videos which explains what monad is and what category theory is, because it is too abstract I cant fully understand it. So
Can I have a useful example of monad??
I wrote this post as an example of using the monad abstraction purely as a practical way to avoid code duplication.
(Many things are Monads; what makes Monad useful is writing a function once (in terms of Monad) and then being able to reuse that same function with Future, Option, Either, Writer, State and so on).