Define reduce in terms of GENERALIZED_SUM
Define inclusive_scan and exclusive_scan in terms of
GENERALIZED_NONCOMMUTATIVE_SUM

Fixes #38