DEV Community

[Comment from a deleted post]
 
jon49 profile image
Jon Nyman

And to be clear, the wrapper itself is not the monad, it is the implementation of bind over the wrapper that is the monad. So, Go doesn't actually implement a monad, it just implements the wrapper. All it needs to do is implement bind and then you would get more elegant code.

 
jon49 profile image
Jon Nyman

And it just occurred to me (I'm getting pretty tired) that the reason Go doesn't make it simpler is because the creators of Go refuse to implement generics for the language. Which is unfortunate, since if you had generics you would be able to bypass some of this tedium in coding.