diff options
author | Holden Rohrer <holden.rohrer@gmail.com> | 2020-01-08 17:45:18 -0500 |
---|---|---|
committer | Holden Rohrer <holden.rohrer@gmail.com> | 2020-01-08 17:45:18 -0500 |
commit | 0974dbfa029acc8dcf2635c2cc43a3471848fb1c (patch) | |
tree | f059ef8b8f6c2511004faeaa291caf89d873379e /utils | |
parent | 590edcd7419963cfe870eb639538cd6a918dd3cf (diff) |
added comb.flip meta-function
Diffstat (limited to 'utils')
-rw-r--r-- | utils/comb.js | 4 |
1 files changed, 4 insertions, 0 deletions
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); +} |