fixes #3: split MonoidalReducer into a separate source file