UNPKG

mezzanine

Version:

Fantasy land union types with pattern matching

17 lines (14 loc) 601 B
'use strict';Object.defineProperty(exports, "__esModule", { value: true }); var _type = require('../type');var _type2 = _interopRequireDefault(_type);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} var Tuple = (...types) => _type2.default`Tuple${types.length}`(types, { length: () => types.length, [Symbol.iterator](ctx) { return function* () { var length = ctx.length; for (var i = 0; i < length; i++) { yield ctx[i];} }; } }). contramap((...types) => types);exports.default = Tuple; //# sourceMappingURL=tuple.js.map