This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A Gist proving that Kotlin's nullable type can be made into a monad without wrapping into another | |
* object and satisfy the Monadic laws | |
* | |
* Kotlin has comprehensive null safety built into the language enforced at compile time, using its | |
* nullable type. | |
* | |
* Its language structure makes dealing with nullable values simple and succinct. Unlike other language | |
* monadic constructs such as Option (scala), Optional(Java8+) and Maybe(Haskell), it is enforced at | |
* compile time and is compatible with existing non monad aware API (for example, |