i'm learning the functional programming with c#, i'm trying to use :validation<Exceptional<double>>
any one know about that type which it is alternative to either type.
my question how to use that type, that is my trial , the invalid part is confusing with me.
Validation<Exceptional<double>> calc3(double x, double y)=>y==0?Invalid(new Error("please use num less that 10")):Valid(Exceptional(x/y));
5 Replies
$details
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
what library is this?
LaYumba.Functional
Invalid
seems like it's creating a Validation
with a result indicating an invalid value