I frequently run into an issue where I want to apply a function over a range of inputs and combine the output into arrays, where the function returns more than 1 value, and each return value should be collected in a different array.
If the function returns only a single argument, it is easy to use mapreduce
with, e.g. vcat
, to concatenate everything into a single array. Is there a built-in way to do the same for multiple return values (e.g. some kind of vcat_of_tuple
)?