Ticket #2414 (closed defect: fixed)
[patch][cla] Reduce dojo.lang.reduce
| Reported by: | peller | Owned by: | alex |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 0.4.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by alex) (diff)
The attached patch (and test) clears up several problems with dojo.lang.reduce:
- the "lenght" typo
- the fact that the arr.shift() is destructive on the argument passed in
- removes bloat to check for an invalid call of arg length = 1
- arg length 3 and the default case seem to be redundant
- reorders the arg list to be more sane and reduce the code and api complexity (we can get away with it in 0.9)
I don't understand the history here so I'm assigning to Alex for review.
Thanks to Josh Staiger, IBM (CCLA)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.