Results 1 to 3 of 3

Thread: Ext.Array.sum improvement

    You found a bug! We've classified it as EXTJS-6972 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,932
    Vote Rating
    548
      2  

    Default Ext.Array.sum improvement

    The Ext.Array.sum polyfill method should be very similar to the Array.reduce method.

    I suggested adding the callback and initialValue params and delegating to Array.reduce when possible.

    Another option is to leave Ext.Array.sum as is and add the new Ext.Array.reduce method.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    Pushed as a story. Thank you!
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,932
    Vote Rating
    548
      0  

    Default

    I was searching what Google did... and if they implemented Array.reduce...

    I found this funny inline comment:

    "We're google; we can't have "map" without "reduce" can we?"

    Link

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •