Monad Design Pattern





Monad Design Pattern consists of 2 parts:

Monad is a container for some value. For every Monad, some methods allow wrap value into Monad.

Monad implements “Inversion of Control” for the value contained inside. To achieve this Monad provides methods that accept functions. These functions take the value of the same type as stored in Monad and return transformed value. The transformed value is wrapped into the same kind of Monad as source one.

Example with photography

2nd one is the original photo ЁЯУ╕
1st one is the Monad of 1st one (using glitch)
3rd one is the Monad of passing output of 2nd one as input

Please ЁЯЩП pass ur comments 

Comments