The way you encoded Maybe looks like a 1:1 replacement for null. I'd use two distinct value constructors Just/Nothing that create tagged values. But I get your intention to keep things simple.
First, thanks for your comment. Yes, the idea was to keep as simple as possible.
I have a queue of things to write, one of them being the Either monad. In that future article, I will be go into more detail with the types associated to it (Left, Right), because from my perspective in those scenarios they make the end goal clearer.
But will also try to keep as simple as possible to embrace people learning the concepts.
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.
The way you encoded
Maybe
looks like a 1:1 replacement fornull
. I'd use two distinct value constructorsJust
/Nothing
that create tagged values. But I get your intention to keep things simple.Hi, Iven.
First, thanks for your comment. Yes, the idea was to keep as simple as possible.
I have a queue of things to write, one of them being the Either monad. In that future article, I will be go into more detail with the types associated to it (Left, Right), because from my perspective in those scenarios they make the end goal clearer.
But will also try to keep as simple as possible to embrace people learning the concepts.