x/rambda/source/transpose.js
123456789101112import {_isArray} from './_internals/_isArray'export function transpose(array) { return array.reduce((acc, el) => { el.forEach((nestedEl, i) => _isArray(acc[i]) ? acc[i].push(nestedEl) : acc.push([nestedEl]) ) return acc }, [])}