Info
Version: | 6.0.0 |
Author(s): | Grzegorz Gałęzowski, Andrey Tsvetkov, William Cassarin |
Last Update: | Thursday, March 30, 2023 |
.NET Fiddle: | Create the first Fiddle |
NuGet Url: | https://www.nuget.org/packages/Core.Maybe |
Install
Install-Package Core.Maybe
dotnet add package Core.Maybe
paket add Core.Maybe
Core.Maybe Download (Unzip the "nupkg" after downloading)
Dependencies
Tags
var maybeOne = "one".ToMaybe();
Maybe<string> maybeAnother;
var maybeBoth =
from one in maybeOne
from another in maybeAnother
select one + another;
maybeBoth.Match(
both => Console.WriteLine("Result is: {0}", both),
@else: () => Console.WriteLine("Result is Nothing, as one of the inputs was Nothing")
);.