Currently UnwrapOr only works on Maybe which is nice but it would be great to have it handle Task<Maybe> as well. This would make things a bit easier overall for fluently chaining together Maybes/Results
This would allow us to do things like:
var value = await _myThing.ReturnsAMaybe()
.Map(x => DoSomething(x))
.UnwrapOr(x => new Whatever);
//Right now this ^ looks like
var thing = await _myThing.ReturnsAMaybe()
.Map(x => DoSomething(x));
var value = _myThing.UnwrapOr(x => new Whatever());
//or
var value = (await _myThing.ReturnsAMaybe()
// ^ Yikes
.Map(x => DoSomething(x)))
.UnwrapOr(x => new Whatever());
Currently UnwrapOr only works on Maybe which is nice but it would be great to have it handle Task<Maybe> as well. This would make things a bit easier overall for fluently chaining together Maybes/Results
This would allow us to do things like: