This commit is contained in:
parent
27978f8d32
commit
118cb35ebd
|
@ -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>
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue