reduce docstring partly incorrect with reducers.

Description

The docstring for reduce includes this: "If val is not supplied, returns the result of applying f to the first 2 items in coll". This is true if coll is a sequence, but not if it is a reducer. For example:

The docstring should be updated to make it clear that reducers (used without an initial seed value) require the reducing function to support a 0 arity overload returning the identity value for the reduction operation.

Environment

None

Activity

Show:

Details

Assignee

Reporter

Priority

Affects versions

Created June 10, 2014 at 7:16 PM
Updated June 10, 2014 at 7:16 PM