I am looking for the functional programming term (if it exists) of a function which converts an array of several 2-tuples into one 2-tuple array.
I think the best way to illustrate my question is through an example. I want to convert array to newArray:
const array = [[10, "A"], [20, "B"], [30, "C"], [40, "D"]]
const newArray = [[10, 20, 30, 40], ["A", "B", "C", "D"]]
My favorite language is javascript and I know I could do this through hacking with reduce but I would like to know if I can find a function like this in functional programming libraries like for example Ramda.
Thank you!