Miscellany
public text v1 · immutable Array.prototype.indexOf = function(n) {
for (var i=0;i<this.length;i++)
if (this[i] === n)
return i;
return -1;
}
Array.prototype.unique = function() {
var a=[],i; this.sort();
for (i=0;i<this.length;i++)
if (this[i]!==this[i+1])
a[a.length]=this[i];
return a;
}