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
### | |
Like java, javascript is optimized for throwing null pointer exceptions | |
coffeescript helps with its series of ? operators | |
but here is a scala option-eqsue "maybe monad" when such semantics | |
are preferred over the ? operators or when you want your data | |
to self-document its indefinite-ness (regular vars don't warn you | |
that you may get null or undefined!). | |
note that we're perfectly happy to give you a Some(null) or a Some(undefined) | |
just like scala. if you have an x that you want to fmap to None if it's |