#2414 closed defect (fixed)
[patch][cla] Reduce dojo.lang.reduce
Reported by: | Adam Peller | Owned by: | alex |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | General | Version: | 0.4.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
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 (2)
Change History (10)
Changed 14 years ago by
Attachment: | reduce.patch added |
---|
comment:1 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 14 years ago by
Description: | modified (diff) |
---|---|
Status: | new → assigned |
Josh, Adam, great patch.
comment:3 Changed 14 years ago by
Milestone: | 0.9 → 0.4.2 |
---|
comment:4 Changed 14 years ago by
Alex -- just to point out that the patch implies an incompatible API change, recommended for 0.9. For 0.4.2, perhaps we could just fix the lenght typo? That's about as low risk as we can get :)
comment:5 Changed 14 years ago by
comment:7 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
new code for dojo.lang.reduce