fix error in reduce signature
update each to use an iterator function that takes in full collection and index as well as item
refactor reduce to use same method signature as underscore