5 ms·
Can anyone explain what value does 'monadic' give to react?
by polskibus 10y ago
Can anyone explain what value does 'monadic' give to react?
- MawNicker 10y agoThere are distinct notions of monad. Just a note.
- acedinlowball 10y agoIs that so? Just a note.
- Nekorosu 10y agoThat's not really helpful without at least two distinct notions of monads shown.
- mpfundstein 10y agoa data class / object is a monad if it confirms to the 3 monadic laws [1]: Left identity, Right identity and Associativity. To do this, it must implement two functions. 1. chain (also called 'flatMap', '>>=' in haskell). 2. unit (sometimes called 'of', for instance in js). Nothing more is needed to understand and implement a monad in any language. [1] https://wiki.haskell.org/Monad_laws https://wiki.haskell.org/Monad_laws
- oyanglulu 10y agothat you can simply flapmap async transform of state to sink