From 0974dbfa029acc8dcf2635c2cc43a3471848fb1c Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Wed, 8 Jan 2020 17:45:18 -0500 Subject: added comb.flip meta-function --- utils/comb.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'utils') diff --git a/utils/comb.js b/utils/comb.js index 8d53d68..4ad89b0 100644 --- a/utils/comb.js +++ b/utils/comb.js @@ -20,3 +20,7 @@ exports.unmask = function(char1, char2){ // Opposite of .mask: shows char2 only if (char1 == '') return ''; else return char2; } + +exports.flip = function(func){ // Switches this and other in the combination algorithm + return (char2, char1) => func(char1, char2); +} -- cgit