Code:

(function(){
var AP=Array.prototype, AP2={
every: function(fun, scope){
var T= this, len= T.length;
if(typeof fun== 'function'){
for(var i= 0; i < len; i++){
if(i in T){
if(fun.call(scope, T[i], i, T)== false) return false;
}
}
return true;
}
return false;
},
filter: function(fun, scope){
var T= this, A= [], i= 0, itm, L= T.length;
if(typeof fun== 'function'){
while(i< L){
if(i in T){
itm= T[i];
if(fun.call(scope, itm, i, T)) A[A.length]= itm;
}
++i;
}
}
return A;
},
forEach: function(fun, scope){
var T= this, L= T.length, i= 0;
if(typeof fun== 'function'){
while(i< L){
if(i in T){
fun.call(scope, T[i], i, T);
}
++i;
}
}
return T;
},
indexOf: function(what, i){
if(!i || typeof i!= 'number') i= 0;
var L= this.length;
while(i<L){
if(this[i]=== what) return i;
++i;
}
return -1;
},
lastIndexOf: function(what, i){
var L= this.length;
i= i || L-1;
if(isNaN(i) || i>= L) i= L-1;
if(i< 0) i += L;
while(i> -1){
if(this[i]=== what) return i;
--i;
}
return -1;
},
map: function(fun, scope){
var T= this, L= T.length, A= Array(L), i= 0;
if(typeof fun== 'function'){
while(i< L){
if(i in T){
A[i]= fun.call(scope, T[i], i, T);
}
++i;
}
return A;
}
},
reduce: function(fun, temp, scope){
var T= this, i= 0, len= T.length, temp;
if(typeof fun=== 'function'){
if(temp== undefined) temp= T[i++];
while(i < len){
if(i in T) temp= fun.call(scope, temp, T[i], i, T);
i++;
}
}
return temp;
},
reduceRight: function(fun, temp, scope){
var T= this.concat().reverse();
return T.reduce(fun, temp, scope);
},
some: function(fun, scope){
var T= this, L= T.length;
if(typeof fun== 'function'){
for(var i= 0; i < L; i++){
if(i in T && fun.call(scope, T[i], i, T)){
return true;
}
}
}
return false;
}
}
for(var p in AP2){
if(!AP[p]) AP[p]= AP2[p];
}
})();