more work on reduce(), added required documentation

Documentation requires further checking.