Sha256: aeca3ff36a71c9add194357b7b5e64abfeba8349e5b8a5ef8415b1eb4cb482a9

Contents?: true

Size: 346 Bytes

Versions: 3

Compression:

Stored size: 346 Bytes

Contents

package p2.reflect {

    public function findFirst(collection:Array, handler:Function):* {
        var result:*;
        var len:Number = collection.length;
        for(var i:int; i < len; i++) {
            result = collection[i];
            if(handler(result, i, collection)) {
                return result;
            }
        }
    }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
asunit4-4.2.3.pre vendor/as3reflection/p2/reflect/findFirst.as
asunit4-4.2.2.pre vendor/as3reflection/p2/reflect/findFirst.as
asunit4-4.2.1.pre vendor/as3reflection/p2/reflect/findFirst.as