xavierjohn / FunctionalDDD

Functional programming with Domain Driven Design.
https://xavierjohn.github.io/FunctionalDDD/
MIT License
31 stars 1 forks source link

Set Result via callback #81

Closed xavierjohn closed 1 year ago

xavierjohn commented 1 year ago

Set Result via callback

Result.Success(() => "Hello");
Result.Failure<string>(() => Error.Validation("Bad first name"));