I am trying to learn c# Language-ext from Paul Louth. I found the type OptionAsync is quite handy as it combines Tasks and Alternatives into one monad, making it a lot easier to work with both.
But I am confused how the await work with OptionAsync. I thought await OptionAsync<T>
would return an Option, as Task and Option are two orthogonal concepts. I feel I am really awaiting the Option. However, the await OptionAsync would return a T not the Option.
My question is, should I never be in the situatoin where await OptionAsync is needed? How do I deal with the option if it's a None? Should I always use OptionAsync as a monad and never get out, where the optionality is probably handled along with the Task in the monad? There must be reason for the design.