carto/lib/mess/tree.js
Tom MacWright 93f66ec41a Fixing variable support, removing annoying
toString method on rule, more to go.
2011-01-24 15:08:47 -05:00

10 lines
225 B
JavaScript

/**
* TODO: document this. What does this do?
*/
require('mess/tree').find = function (obj, fun) {
for (var i = 0, r; i < obj.length; i++) {
if (r = fun.call(obj, obj[i])) { return r }
}
return null;
};