From 118cb35ebd55a77cad4b80bc17bd7e8ec9e5d334 Mon Sep 17 00:00:00 2001 From: sanchime Date: Wed, 5 Apr 2023 10:48:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sanchime.Functional/Monads/FreeMonad.cs | 2 +- Sanchime.Functional/Products/IMatchable.cs | 21 --------------------- Sanchime.Functional/Products/Unit.cs | 3 +-- 3 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 Sanchime.Functional/Products/IMatchable.cs diff --git a/Sanchime.Functional/Monads/FreeMonad.cs b/Sanchime.Functional/Monads/FreeMonad.cs index 0e10705..cc8aee7 100644 --- a/Sanchime.Functional/Monads/FreeMonad.cs +++ b/Sanchime.Functional/Monads/FreeMonad.cs @@ -36,7 +36,7 @@ internal sealed class More : Free public static class FreeMonad { /// - /// 自然变幻Return, 将值导入至Free的世界 + /// 将值转换为Free /// /// 无状态的值 /// diff --git a/Sanchime.Functional/Products/IMatchable.cs b/Sanchime.Functional/Products/IMatchable.cs deleted file mode 100644 index 1b430ba..0000000 --- a/Sanchime.Functional/Products/IMatchable.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Sanchime.Functional.Products; - - -public interface IMatchable -{ - TResult Match(Func left, Func right); - - Unit Match(Action left, Action right); -} - -public interface IMatchable -{ - TResult Match(Func left, Func right); - - Unit Match(Action left, Action right); -} \ No newline at end of file diff --git a/Sanchime.Functional/Products/Unit.cs b/Sanchime.Functional/Products/Unit.cs index 95915d7..8824b16 100644 --- a/Sanchime.Functional/Products/Unit.cs +++ b/Sanchime.Functional/Products/Unit.cs @@ -5,8 +5,7 @@ public sealed class Unit : IEquatable private static readonly Unit _unique = new(); public static Unit Value => _unique; - - private Unit() { } + static Unit() { } public override int GetHashCode() => 0;