var remove = function(arr, pred){ var len = arr.length for(var i=0; i