@arthurgubaidullin/nx-embed-dependencies
Version:
This plugin for [Nx](https://nx.dev) helps injecting local dependencies into a package.
29 lines (28 loc) • 674 B
JavaScript
/**
* @since 2.11.0
*/
import { flow, identity } from './function';
/**
* @category type lambdas
* @since 2.11.0
*/
export var URI = 'Endomorphism';
/**
* Endomorphism form a `Semigroup` where the `concat` operation is the usual function composition.
*
* @category instances
* @since 2.11.0
*/
export var getSemigroup = function () { return ({
concat: function (first, second) { return flow(first, second); }
}); };
/**
* Endomorphism form a `Monoid` where the `empty` value is the `identity` function.
*
* @category instances
* @since 2.11.0
*/
export var getMonoid = function () { return ({
concat: getSemigroup().concat,
empty: identity
}); };