Computes the sum of the values in array, but it accepts predicate which is invoked for each element in array to generate the value to be summed
generateSumByTheGivenPredicate([1,2,3], x => x*2);// returns 12 Copy
generateSumByTheGivenPredicate([1,2,3], x => x*2);// returns 12
Computes the sum of the values in array, but it accepts predicate which is invoked for each element in array to generate the value to be summed