Skip to content

Change add example to a non-commutative example (such as subtract), to avoid ambiguity in partials, and possibly other situations. #6484

Description

@migueltorrescosta

Checklist

  • I have checked the issues list
    for similar or identical bug reports.
  • I have checked the pull requests list
    for existing proposed fixes.
  • I have checked the commit log
    to find out if the bug was already fixed in the master branch.
  • I have included all related issues and possible duplicate issues in this issue
    (If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

  • None

Possible Duplicates

  • None

Description

The documentation makes extensive use of the add(a,b) example. Rarely are the user cases commutative. This is of particular importance when learning about partials, but might appear in other situations. There is no ambiguity in add.s(2).delay(3) as it is 2+3 or 3+2, but subtract.s(2).delay(3) could be 2-3=-1 or 3-2=1 , and understanding how to decide which args are being defined in a partial is useful.

Suggestions

Replace add examples by subtract examples, or another non commutative operator.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions