Innovenergy_trunk/frontend/node_modules/fp-ts/es6/Witherable.js

20 lines
699 B
JavaScript

import * as _ from './internal';
export function wiltDefault(T, C) {
return function (F) {
var traverseF = T.traverse(F);
return function (wa, f) { return F.map(traverseF(wa, f), C.separate); };
};
}
export function witherDefault(T, C) {
return function (F) {
var traverseF = T.traverse(F);
return function (wa, f) { return F.map(traverseF(wa, f), C.compact); };
};
}
export function filterE(W) {
return function (F) {
var witherF = W.wither(F);
return function (predicate) { return function (ga) { return witherF(ga, function (a) { return F.map(predicate(a), function (b) { return (b ? _.some(a) : _.none); }); }); }; };
};
}