Open paulcanning opened 2 years ago
The original idea of the NOT operator was that it'd revert the result of the matcher, basically subtracting points from the end-result if the matcher reports it's matching.
There's a high chance I have not implemented that basic idea properly though
Bit more fiddling, and this seems to give better results
module.exports = (l, r) => (data) => {
let rl = l(data);
let rr = r(data);
if (rl > rr) {
return rl;
}
return 0;
};
Trying to figure out how to implement the NOT operator, using the same style of the others.
This is giving me promising results, eg
But then flops with something like
No idea how it's so broken, but like I mentioned in another issue, I don't really understand the logic used in the operators yet. This is just a first stab in the dark at the NOT operator.