Utility function, adapted from CMPRODUCT cmapply_redim : Utility function, used to collect collaped dimensions Applies a function to specified dimensions of an array Description: CMAPPLY will apply one of a few select functions to specified dimensions of an array.