diff --git a/Foundation/CPArray.j b/Foundation/CPArray.j index 949b900ac..6d474a361 100755 --- a/Foundation/CPArray.j +++ b/Foundation/CPArray.j @@ -1235,6 +1235,18 @@ sort(function(lhs, rhs) { return objj_msgSend(lhs, aSelector, rhs); }); } +- (void)enumerateObjectsUsingBlock:(Function)aBlock +{ + for (var i = 0; i < self.length; i++) + { + var shouldStop = NO; + aBlock(self[i], i, shouldStop); + + if (shouldStop) + break; + } +} + @end @implementation CPArray (CPCoding)