In C#, What is a monad?

前端 未结 6 1246
南笙
南笙 2020-12-12 09:00

There is a lot of talk about monads these days. I have read a few articles / blog posts, but I can\'t go far enough with their examples to fully grasp the concept. The reaso

6条回答
  •  长情又很酷
    2020-12-12 09:20

    You can think of a monad as a C# interface that classes have to implement. This is a pragmatic answer that ignores all the category theoretical math behind why you'd want to choose to have these declarations in your interface and ignores all the reasons why you'd want to have monads in a language that tries to avoid side effects, but I found it to be a good start as someone who understands (C#) interfaces.

提交回复
热议问题