Compare commits
No commits in common. "92507c8c064c1aedd4543213bc66e73d8a569f8f" and "115d6766a536e33046cdbe252b0254cf3e83a4a1" have entirely different histories.
92507c8c06
...
115d6766a5
|
@ -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();
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
namespace Sanchime.Functional.Core.Products;
|
||||
|
||||
/// <summary>
|
||||
/// 单位元
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <returns></returns>
|
||||
public delegate T Identity<T>();
|
Loading…
Reference in New Issue