Closed jpwesterhof closed 1 year ago
I was a bit messy with my first two commits, because I copy pasted it from code I currently use. Hence the two follow up commits with fixes to these two forgotten characters (, and ;).
Alright, sounds good. I'd rather only export triad and tetrad (and not export all the others), but then expose the new one that allows a variable number of outputs. I believe we could call it 'polyad', which is what I could find as the name for these groupings: https://en.wiktionary.org/wiki/polyad
Done
Forgot about the internals... done
This sounds like a cool idea. These need to pass arguments
to _applyCombination
like the other public methods. So, just make the private triad
and tetrad
functions call polyad
with 3
or 4
as n
.
triad: function() {
return this._applyCombination(triad, arguments);
},
tetrad: function() {
return this._applyCombination(tetrad, arguments);
},
polyad: function() {
return this._applyCombination(polyad, arguments);
}
...
function triad(color) {
return polyad(color, 3);
}
function tetrad(color) {
return polyad(color, 4);
}
Landed this in #250. Thanks @jpwesterhof and sorry for dropping this