Skip to content

Instantly share code, notes, and snippets.

237.times("All work and no play makes Jack a dull boy.")
http://thesaurus.reference.com/browse/thesaurus
@maxterry
maxterry / aif.js
Created July 22, 2008 15:51
open web functions
aif = function(_) {
_ = Array.slice(arguments)
return(each(_, function(i) {
if(i % 2 == 0 && !!this) {
return(fn.apply(this))
}
}))
}
We couldn’t find that file to show.
self.pr = function() {
var literal = "["
for (var i=0; i<self.length; i++)
literal += (i != self.length-1) ? self[i]+", " : self[i]+"]"
return literal
}
self.eq = function(other) {
// Is self equal to other?
if (self.length !== other.length) return 0
var equal = 1
for (var i=0; i<self.length; i++) {
if (self[i] !== other[i]) equal = 0
}
return equal
}
// do as self.isany()
self.isa = function(/* args */) {
if (arguments.length > 0) {
// Prepare arguments and constructors
var args = Array.prototype.slice.call(arguments), // args provide an .isany() feature; could do in sep method
makers = [] //: list
self.eq = function(other) {
// Is self equal to other?
if (self.length !== other.length) return 0
var equal = 1
for (var i=0; i<self.length; i++) {
if (self[i] !== other[i])
equal = 0
}
return equal
}