Added reduce method to NSArray