This commit is contained in:
sanchime 2023-04-05 10:48:24 +08:00
parent 27978f8d32
commit 118cb35ebd
3 changed files with 2 additions and 24 deletions

View File

@ -36,7 +36,7 @@ internal sealed class More<T> : Free<T>
public static class FreeMonad public static class FreeMonad
{ {
/// <summary> /// <summary>
/// 自然变幻Return 将值导入至Free的世界 /// 将值转换为Free
/// </summary> /// </summary>
/// <param name="value">无状态的值</param> /// <param name="value">无状态的值</param>
/// <typeparam name="T"></typeparam> /// <typeparam name="T"></typeparam>

View File

@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Sanchime.Functional.Products;
public interface IMatchable<TValue>
{
TResult Match<TResult>(Func<TResult> left, Func<TValue, TResult> right);
Unit Match(Action left, Action<TValue> right);
}
public interface IMatchable
{
TResult Match<TValue, TResult>(Func<TResult> left, Func<TValue, TResult> right);
Unit Match<TValue>(Action left, Action<TValue> right);
}

View File

@ -5,8 +5,7 @@ public sealed class Unit : IEquatable<Unit>
private static readonly Unit _unique = new(); private static readonly Unit _unique = new();
public static Unit Value => _unique; public static Unit Value => _unique;
private Unit() { }
static Unit() { } static Unit() { }
public override int GetHashCode() => 0; public override int GetHashCode() => 0;