There are lots of cases that you can improve. The examples use nullable reference types, but only the WhenNotNull example requires it.
Consider adopting the new property pattern, wherever you use IsNullOrEmpty.
string? hello = "hello world";There are lots of cases that you can improve. The examples use nullable reference types, but only the WhenNotNull example requires it.
Consider adopting the new property pattern, wherever you use IsNullOrEmpty.
string? hello = "hello world";| public static partial class LinqExtensions | |
| { | |
| public static Maybe<C> SelectMany<A, B, C>(this Maybe<A> ma, Func<A, Maybe<B>> f, Func<A, B, C> select) => ma.Bind(a => f(a).Map(b => select(a, b))); | |
| } |