array[0].map((_, colIndex) => array.map(row => row[colIndex]));
transpose = m => m[0].map((x,i) => m.map(x => x[i]))