@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">
21 lines (17 loc) • 639 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.sequence = sequence;
var _HKT = require('./HKT');
var _Identity = require('./Identity');
// `Traversable` represents data structures which can be _traversed_,
// accumulating results and effects in some `Applicative` functor.
//
// - `traverse` runs an action for every element in a data structure,
// and accumulates the results.
// - `sequence` runs the actions _contained_ in a data structure,
// and accumulates the results.
function sequence(applicative, traversable, tfa) {
return traversable.traverse(applicative, _Identity.id, tfa);
}