function genMatrix (options) {
let ar = []
options.forEach(item => ar.push(item.values))
const f = (a, b) => [].concat(...a.map(d => b.map(e => [].concat(d, e))));
const cartesian = (a, b, ...c) => (b ? cartesian(f(a, b), ...c) : a);
return cartesian(...ar);
}