I need to generate a couple of objects from lists in Javascript. In Python, I\'d write this:
{key_maker(x): val_maker(x) for x in a_list}
A
A shorter ES6 version would be:
a_list.reduce((obj, x) => (key_maker(obj[x]) = val_maker(x), obj),{})