wareismymind / Secundatives

MIT License
3 stars 2 forks source link

Expect<T> Should work in async/Task contexts #22

Closed Insomniak47 closed 5 years ago

Insomniak47 commented 5 years ago

Currently we can't use Expect or the other Maybe related extensions on a task without first awaiting that task. That isn't great.

ex:

var myThing = (await MyTaskReturningFunction()).Expect();

I think this reads better: ex:

var myThing = await MyTaskReturningFunction().Expect()

Again like #21 the cost is low for a relatively nice ergo enhancement.