Last active
October 12, 2016 14:07
-
-
Save edopelawi/fe98e9190ed77d45b58584e16ccc8739 to your computer and use it in GitHub Desktop.
A simplified implementation of Swift's Optional, taken from Benedict Terhecte's blog post: https://appventure.me/2015/10/17/advanced-practical-enum-examples/
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
// Simplified implementation of Swift's Optional | |
enum MyOptional<T> { | |
case some(T) | |
case none | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment