squeezeflip, tests for add including failing one..
This commit is contained in:
parent
d9e3ff3256
commit
974503160d
2 changed files with 32 additions and 2 deletions
|
|
@ -263,7 +263,7 @@ export class Pattern {
|
|||
_opSqueezeFlip(other, func) {
|
||||
const thisPat = this;
|
||||
const otherPat = reify(other);
|
||||
return otherPat.fmap((a) => thisPat.fmap((b) => func(a)(b)))._squeezeJoin();
|
||||
return otherPat.fmap((a) => thisPat.fmap((b) => func(b)(a)))._squeezeJoin();
|
||||
}
|
||||
|
||||
_asNumber(silent = false) {
|
||||
|
|
@ -754,6 +754,9 @@ for (const [name, op] of Object.entries(composers)) {
|
|||
Pattern.prototype[name + 'Squeeze'] = function (...other) {
|
||||
return op[1](this)._opSqueeze(sequence(other), op[0]);
|
||||
};
|
||||
Pattern.prototype[name + 'SqueezeFlip'] = function (...other) {
|
||||
return op[1](this)._opSqueezeFlip(sequence(other), op[0]);
|
||||
};
|
||||
}
|
||||
|
||||
// methods of Pattern that get callable factories
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue