https://github.com/strilanc/may
An option type for .Net
https://github.com/strilanc/may
Last synced: 4 months ago
JSON representation
An option type for .Net
- Host: GitHub
- URL: https://github.com/strilanc/may
- Owner: Strilanc
- License: other
- Created: 2012-11-25T00:37:18.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2017-01-29T07:47:06.000Z (over 9 years ago)
- Last Synced: 2024-10-04T15:39:14.665Z (over 1 year ago)
- Language: C#
- Size: 66.4 KB
- Stars: 31
- Watchers: 5
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: ReadMe.txt
- License: License.txt
Awesome Lists containing this project
README
Implements an option type (Strilanc.Value.May) that encourages usage based on pattern matching rather than ForceGetValue. Also includes utility methods for producing, consuming and transforming May.
Note on null: May treats null like any other value. May.NoValue is distinct from null, and both are distinct from ((object)null).Maybe().
Blog post with usage examples: http://twistedoakstudios.com/blog/Post1130_when-null-is-not-enough-an-option-type-for-c
NuGet package: https://nuget.org/packages/Strilanc.Value.May