Compare commits

..

No commits in common. "92507c8c064c1aedd4543213bc66e73d8a569f8f" and "115d6766a536e33046cdbe252b0254cf3e83a4a1" have entirely different histories.

2 changed files with 0 additions and 20 deletions

View File

@ -1,12 +0,0 @@
using Sanchime.Functional.Core.Products;
namespace Sanchime.Functional.Core.Extensions;
public static class IdentityExtension
{
public static Identity<R> Map<T, R>(this Identity<T> @this, Func<T, R> mapping)
=> () => mapping(@this());
public static Identity<R> Bind<T, R>(this Identity<T> @this, Func<T, Identity<R>> binding)
=> binding(@this()).Invoke();
}

View File

@ -1,8 +0,0 @@
namespace Sanchime.Functional.Core.Products;
/// <summary>
/// 单位元
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
public delegate T Identity<T>();