issue #335 Monad pattern introduced

This commit is contained in:
Crossy147
2016-02-19 17:56:09 +01:00
parent f1122f78e3
commit 3e526cb5da
9 changed files with 272 additions and 0 deletions

29
monad/index.md Normal file
View File

@@ -0,0 +1,29 @@
---
layout: pattern
title: Monad
folder: monad
permalink: /patterns/monad/
categories: Presentation Tier
tags:
- Java
- Difficulty-Advanced
---
## Intent
Monad pattern based on monad from linear algebra represents the way of chaining operations
together step by step. Binding functions can be described as passing one's output to another's input
basing on the 'same type' contract.
![alt text](./etc/monad.png "Monad")
## Applicability
Use the Monad in any of the following situations
* when you want to chain operations easily
* when you want to apply each function regardless of the result of any of them
## Credits
* [Design Pattern Reloaded by Remi Forax](https://youtu.be/-k2X7guaArU)
* [Brian Beckman: Don't fear the Monad](https://channel9.msdn.com/Shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads)