rem: reduce: function (fn, iterable, /* optional */initial) { /***  Apply a fn = function (a, b) cumulatively to the items of an iterable from left to right, so as to reduce the iterable to a single value.  For example::  reduce(function (a, b) { return x + y; }, [1, 2, 3, 4, 5])  calculates::  ((((1 + 2) + 3) + 4) + 5).  If initial is given, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty.  Note that the above example could be written more clearly as::  reduce(operator.add, [1, 2, 3, 4, 5])  Or even simpler::  sum([1, 2, 3, 4, 5])  ***/ var i = 0; var x = initial; var self = MochiKit.Iter; iterable = self.iter(iterable); if (arguments.length < 3) { try { x = iterable.next(); } catch (e) { if (e == self.StopIteration) { e = new TypeError("reduce() of empty sequence with no initial value"); } throw e; } i++; } try { while (true) { x = fn(x, iterable.next()); } } catch (e) { if (e != self.StopIteration) { throw e; } } return x; }, 
add: },reduce:function(fn,_157,_158){ var i=0; var x=_158; var self=MochiKit.Iter; _157=self.iter(_157); if(arguments.length<3){ try{ x=_157.next(); } catch(e){ if(e==self.StopIteration){ e=new TypeError("reduce() of empty sequence with no initial value"); } throw e; } i++; } try{ while(true){ x=fn(x,_157.next()); } } catch(e){ if(e!=self.StopIteration){ throw e; } } return x; },range:function(){ 
context:     reduce: function (fn, iterable, /* optional */initial) {        /***            Apply a fn = function (a, b) cumulatively to the items of an            iterable from left to right, so as to reduce the iterable            to a single value.            For example::                reduce(function (a, b) { return x + y; }, [1, 2, 3, 4, 5])            calculates::                ((((1 + 2) + 3) + 4) + 5).            If initial is given, it is placed before the items of the sequence            in the calculation, and serves as a default when the sequence is            empty.            Note that the above example could be written more clearly as::                reduce(operator.add, [1, 2, 3, 4, 5])            Or even simpler::                sum([1, 2, 3, 4, 5])        ***/        var i = 0;        var x = initial;        var self = MochiKit.Iter;        iterable = self.iter(iterable);        if (arguments.length < 3) {            try {                x = iterable.next();            } catch (e) {                if (e == self.StopIteration) {                    e = new TypeError("reduce() of empty sequence with no initial value");                }                throw e;            }            i++;        }        try {            while (true) {                x = fn(x, iterable.next());            }        } catch (e) {            if (e != self.StopIteration) {                throw e;            }        }        return x;    },
meta: 8607	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8607/ad067b3f5d648d6df90ec6fb2b79f0027612a307/MochiKit.js/buggy/trunk/lib/MochiKit.js