@dillonkearns/elm-graphql
Version:
<img src="https://cdn.jsdelivr.net/gh/martimatix/logo-graphqelm/logo.svg" alt="dillonearns/elm-graphql logo" width="40%" align="right">
25 lines (19 loc) • 495 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getMonoid = getMonoid;
// for any object A in any category C, the set of arrows from A to A
// is a monoid under the composition operation of C
// the set of arrows from A to B
function getMonoid(category) {
return {
empty: function empty() {
return category.id();
},
concat: function concat(x, y) {
return category.compose(x, y);
}
};
}
// the set of arrows from A to A