Skip to content

(un)specify associativity of reduce and mapreduce #4046

@stevengj

Description

@stevengj

Currently, the reduce and mapreduce implementations are left-associative, but this is not documented in the manual. For accuracy reasons (#4039) and possibly for future performance reasons (in parallel implementations), left-associativity is not necessarily the best choice. My suggestion is:

  • Explicitly document that the associativity of these functions is implementation-dependent and unspecified.
  • Provide reduce_left and mapreduce_left functions that are documented to be left-associative, for applications that need this (e.g. Monads.jl).

cc: @StefanKarpinski, @pao

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingThis change will break codeneeds decisionA decision on this change is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions