I often need to map a list of functions (processors) to several arrays(channels) of float data) so I have written a helper function...
const mapMany = function(processors, channels){
processors.forEach( function(processor){
channels = channels.map( (channel) => channel.map(processor) );
});
return channels;
};
This reads OK (to me at least!) but mapping an array of functions over another array seems like such a generic thing I can't help but wonder if it IS "a thing" already i.e. is there a better / built in / canonical way of implementing this "Map Many" type functionality and if so what is the proper name for it?