diff --git a/Option.cs b/Option.cs index 0b24655..26335d0 100644 --- a/Option.cs +++ b/Option.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Collections.Generic; using System.Linq; @@ -89,6 +90,15 @@ public static Option map(this Option @this, Func func) { () => Option.None, value => Option.Some(func(value))); } + public static bool exist(this Option @this, Option other) => + @this.fold( + () => false, + left => other.fold( + () => false, + right => left.Equals(right) + ) + ); + public static Option flatMap(this Option @this, Func> func) { return @this.fold( () => Option.None, func); diff --git a/bin/Release/funkylib.dll b/bin/Release/funkylib.dll index d86f551..f46f942 100644 Binary files a/bin/Release/funkylib.dll and b/bin/Release/funkylib.dll differ diff --git a/bin/Release/funkylib.pdb b/bin/Release/funkylib.pdb index e62d510..ce57066 100644 Binary files a/bin/Release/funkylib.pdb and b/bin/Release/funkylib.pdb differ diff --git a/obj/Release/CoreCompileInputs.cache b/obj/Release/CoreCompileInputs.cache index 4f01bd9..ce241d2 100644 --- a/obj/Release/CoreCompileInputs.cache +++ b/obj/Release/CoreCompileInputs.cache @@ -1 +1 @@ -b41efbdb0739bc08d73825ff2d48a3bfc7c45341 +c304f7f8ade77d758475770f8271d01f624fe97c diff --git a/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index 65376de..153b733 100644 Binary files a/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/obj/Release/funkylib.csproj.FileListAbsolute.txt b/obj/Release/funkylib.csproj.FileListAbsolute.txt index 1a6296a..8ba9b21 100644 --- a/obj/Release/funkylib.csproj.FileListAbsolute.txt +++ b/obj/Release/funkylib.csproj.FileListAbsolute.txt @@ -16,3 +16,7 @@ D:\Learning\code-retreat\lib\funkylib\bin\Release\funkylib.dll D:\Learning\code-retreat\lib\funkylib\bin\Release\funkylib.pdb D:\Learning\code-retreat\lib\funkylib\obj\Release\funkylib.dll D:\Learning\code-retreat\lib\funkylib\obj\Release\funkylib.pdb +F:\Code\Stupid\funkylib\bin\Release\funkylib.dll +F:\Code\Stupid\funkylib\bin\Release\funkylib.pdb +F:\Code\Stupid\funkylib\obj\Release\funkylib.dll +F:\Code\Stupid\funkylib\obj\Release\funkylib.pdb diff --git a/obj/Release/funkylib.dll b/obj/Release/funkylib.dll index d86f551..f46f942 100644 Binary files a/obj/Release/funkylib.dll and b/obj/Release/funkylib.dll differ diff --git a/obj/Release/funkylib.pdb b/obj/Release/funkylib.pdb index e62d510..ce57066 100644 Binary files a/obj/Release/funkylib.pdb and b/obj/Release/funkylib.pdb differ