Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return Z.map (other.value, this);
};
Identity.prototype[FL.chain] = function(f) {
return f (this.value);
};
Identity.prototype[FL.reduce] = function(f, x) {
return f (x, this.value);
};
Identity.prototype[FL.traverse] = function(typeRep, f) {
return Z.map (Identity, f (this.value));
};
Identity.prototype[FL.extend] = function(f) {
return Identity (f (this));
};
Identity.prototype[FL.extract] = function() {
return this.value;
};
Identity.prototype.inspect =
Identity.prototype['@@show'] = function() {
return 'Identity (' + show (this.value) + ')';
};
module.exports = Identity;
return map (other.value) (this);
};
Identity.prototype[FL.chain] = function(f) {
return f (this.value);
};
Identity.prototype[FL.reduce] = function(f, x) {
return f (x, this.value);
};
Identity.prototype[FL.traverse] = function(typeRep, f) {
return map (Identity) (f (this.value));
};
Identity.prototype[FL.extend] = function(f) {
return Identity (f (this));
};
Identity.prototype[FL.extract] = function() {
return this.value;
};
Identity.prototype.inspect =
Identity.prototype['@@show'] = function() {
return 'Identity (' + show (this.value) + ')';
};
module.exports = Identity;
const extend = (fn, tx) => tx[$.extend](fn)
const extract = (tx) => tx[$.extract]()
const result = []
if (Constructor[$.of]) result.push('of')
if (Constructor[$.empty]) result.push('empty')
if (Constructor[$.chainRec]) result.push('chainRec')
if (Constructor[$.zero]) result.push('zero')
if (Constructor.prototype[$.equals]) result.push('equals')
if (Constructor.prototype[$.map]) result.push('map')
if (Constructor.prototype[$.bimap]) result.push('bimap')
if (Constructor.prototype[$.promap]) result.push('promap')
if (Constructor.prototype[$.concat]) result.push('concat')
if (Constructor.prototype[$.ap]) result.push('ap')
if (Constructor.prototype[$.alt]) result.push('alt')
if (Constructor.prototype[$.reduce]) result.push('reduce')
if (Constructor.prototype[$.traverse]) result.push('traverse')
if (Constructor.prototype[$.chain]) result.push('chain')
if (Constructor.prototype[$.extend]) result.push('extend')
if (Constructor.prototype[$.extract]) result.push('extract')
return result
}