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
package union | |
/** | |
* Much magic. Very Lambda. Wow! | |
* | |
* These types provide union types (i.e. val a = (String or Int) within Scala. See here for good discussion on | |
* how to represent union types in Scala (hat tip Miles Sabin) | |
* http://stackoverflow.com/a/37450446/1591351 | |
* | |
* Core idea is to adapt Demorgan's Law: |