Generic map and bind support for Nullable<_>
See original GitHub issueDescription
There is currently no support for using the general functions and operators for map, bind, etc. on System.Nullable<T>
like there is for Option<T>
. This would be nice to have when using types from C#-style libraries.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Are there any nullable annotations that implicitly extend to ...
I was wondering if there are any annotations that can be added to an argument so that it covers generic types as well....
Read more >Null Object design pattern and Maybe Monad in C# | Medium
We can extend the Nullable<T> with a Map method that would only apply a function Func<T, T1> when the nullable has a value....
Read more >Result of left joining a nullable nominal type should be null ...
When generating left join we need to add additional null check in selector so that we can generate correct default type if sequence...
Read more >Functional C#: Non-nullable reference types
Working with Maybe using bind and map operations is a good thing, but - again - in many cases it may signalize problems...
Read more >Interface DatabaseClient.GenericExecuteSpec
Bind a non- null value to a parameter identified by its index . DatabaseClient. ... Configure a result mapping function and enter the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, I’ll play with it and if it seems to work I’ll submit a PR
I created a PR with a Nullable module with map, bind and iter and overloads for the generic Map and Bind. Personally I wouldn’t get much use out other things, but can add things like
exists
andtoList
if there would be a desire.