I don't often use zip()
, but by coincidence this week I ran into it a few times, using both Python and JavaScript. In the former, it's a built-in, but in the latter it's typically provided by a library like D3. And it struck me as kind of a fun warm-up challenge. How would you write this function in modern JavaScript?
Well, let's see how D3 does it. Oh, it's a wrapper around transpose()
, here we go...
import min from "./min.js";
function length(d) {