Split reduce functionality into reduce and fold.