src/lib/collections/list.js
function (match) {
        assertType(match, Function);

        var arr = new Array(this.length),
            count = 0;

        for (var i = 0, len = this.length; i < len; i++) {
            if (match(this[i]) === true) {
                arr[count++] = this[i];
            }
        }

        arr.length = count;
        return new List(arr);
    }
function (match) {
        assertType(match, Function);

        var arr = new Array(this.length),
            count = 0;

        for (var i = 0, len = this.length; i < len; i++) {
            if (match(this[i]) === true) {
                arr[count++] = this[i];
            }
        }

        arr.length = count;
        return new List(arr);
    }
function ( match ) { assertType ( match , Function ) ; var arr = new Array ( this . length ) , count = 0 ; for ( var i = 0 , len = this . length ; i < len ; i ++ ) { if ( match ( this [ i ] ) === true ) { arr [ count ++ ] = this [ i ] ; } } arr . length = count ; return new List ( arr ) ; }
Retrieves all the elements that match the conditions defined by the specified predicate.
@param {Function} match The predicate function that defines the conditions of the elements to search for. eg. function(item)
@returns {List}
Retrieves all the elements that match the conditions defined by the specified predicate .