版博士V2.0程序
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

Endomorphism.js 902 B

123456789101112131415161718192021222324252627282930313233
  1. "use strict";
  2. /**
  3. * @since 2.11.0
  4. */
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. exports.getMonoid = exports.getSemigroup = exports.URI = void 0;
  7. var function_1 = require("./function");
  8. /**
  9. * @category type lambdas
  10. * @since 2.11.0
  11. */
  12. exports.URI = 'Endomorphism';
  13. /**
  14. * Endomorphism form a `Semigroup` where the `concat` operation is the usual function composition.
  15. *
  16. * @category instances
  17. * @since 2.11.0
  18. */
  19. var getSemigroup = function () { return ({
  20. concat: function (first, second) { return (0, function_1.flow)(first, second); }
  21. }); };
  22. exports.getSemigroup = getSemigroup;
  23. /**
  24. * Endomorphism form a `Monoid` where the `empty` value is the `identity` function.
  25. *
  26. * @category instances
  27. * @since 2.11.0
  28. */
  29. var getMonoid = function () { return ({
  30. concat: (0, exports.getSemigroup)().concat,
  31. empty: function_1.identity
  32. }); };
  33. exports.getMonoid = getMonoid;