batch_recode = function(table, options) {
let columns = get_columns_set(table, options.columns);
let recode_options = "$.recoding";
if (options.hasOwnProperty("fallback")) {
recode_options = "$.recoding, $.fallback";
}
let derives = {};
columns.forEach(col => {
let new_name = col;
if (options.prefix) new_name = options.prefix + new_name;
if (options.suffix) new_name = new_name + options.suffix;
derives[new_name] = (v =>
`(d,$) => op.recode(d['${v}'], ${recode_options})`)(col);
});
return table.params(options).derive(derives);
}