Explanation of Monad using C#. Monads have 2 sides to them: 1. storing a value 2. applying functions to stored value. This gives us function composition between functions that return a monad value and a function that takes the contained value within the monad. The function application mechanism of the monad knows how to pass the stored value in to the supplied function. This pattern brings automatic handling of nulls/awaits/try or any other effect in between function composition. The end result is a clear problem that you are trying to solve free of edge cases.
Patreon 🤝 / raw_coding
Courses 📚 learning.raw-coding.dev
Shop 🛒 shop.raw-coding.dev
Discord 💬 / discord
Twitter 📣 / anton_t0shik
Twitch 🎥 / raw_coding
more resource Monads:
• Brian Beckman: Don't f...
• Category Theory 10.1: ...
Playlist: • c# design patterns
Source: github.com/raw-coding-youtube...
#csharp #monad #designpatterns
Негізгі бет Monad Design Pattern (C#)
Пікірлер: 32