This commit is contained in:
alex 2022-04-24 11:30:13 +01:00
parent df5ffb4736
commit 27ff329981

View file

@ -777,7 +777,7 @@ export class Pattern {
// TODO - adopt value.mjs fully.. // TODO - adopt value.mjs fully..
function _composeOp(a, b, func) { function _composeOp(a, b, func) {
function _nonFunctionObject(x) { function _nonFunctionObject(x) {
return x instanceof Object && (!(x instanceof Function)) return x instanceof Object && !(x instanceof Function);
} }
if (_nonFunctionObject(a) || _nonFunctionObject(b)) { if (_nonFunctionObject(a) || _nonFunctionObject(b)) {
if (!_nonFunctionObject(a)) { if (!_nonFunctionObject(a)) {
@ -800,7 +800,7 @@ const composers = {
mul: (a, b) => a * b, mul: (a, b) => a * b,
div: (a, b) => a / b, div: (a, b) => a / b,
mod: mod, mod: mod,
func: (a, b) => b(a) func: (a, b) => b(a),
}; };
for (const [name, op] of Object.entries(composers)) { for (const [name, op] of Object.entries(composers)) {