IntelLabs / RiverTrail

An API for data parallelism in JavaScript
Other
748 stars 71 forks source link

index not passed into elementalFunction for ParallelArray.filter() #11

Closed ghost closed 13 years ago

ghost commented 13 years ago

Documentation for ParallelArray.filter() states that the elementalFunction's arguments are this (reference to the ParallelArray object) and index (element offset).

Only this is being applied, which is the actual element being processed; index is never passed into the elementalFunction.

sherhut commented 13 years ago

Thank you for reporting this inconsistency. The implementation has now been fixed. The documentation was correct and described the intended behaviour.