Child pages
  • fluid.accumulate

Documentation for a historical release of Infusion: 1.3
Please view the Infusion Documentation site for the latest documentation.
If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

Skip to end of metadata
Go to start of metadata

fluid.accumulate(list, fn, arg)

Scans through a list of objects, "accumulating" a value over them (may be a straightforward "sum" or some other chained computation). The results will be added to the initial value passed in by "arg" and returned.

To a Google developer, this would be "reduce", from the "map/reduce" pairing.

Arguments

  • list {Array}: The list of objects to be accumulated over
  • fn {Function}: An "accumulation function" accepting the signature (object, total, index) where object is the list member, total is the "running total" object (which is the return value form the previous function), and index is the index number.
  • arg {Object}: The initial value for the "running total" object

Return Value

Object: the modified "arg" object

  • No labels

1 Comment

  1. Anonymous

    michael kors outlet michael kors handbags outlet michael kors bags outlet michael kors handbags for outlet outlet michael kors free shipping michael kors wholesale outlet michael kors wallet outlet michael kors canada outlet http://www.blueridgecamp.com/?tag=michael+kors+outlet http://www.blueridgecamp.com/?tag=michael+kors+handbags+outlet http://www.blueridgecamp.com/?tag=michael+kors+bags+outlet http://www.blueridgecamp.com/?tag=michael+kors+handbags+for+outlet http://www.blueridgecamp.com/?tag=outlet+michael+kors+free+shipping http://www.blueridgecamp.com/?tag=michael+kors+wholesale+outlet http://www.blueridgecamp.com/?tag=michael+kors+wallet+outlet http://www.blueridgecamp.com/?tag=michael+kors+canada+outletbYufzwrvJT