rem: iter: function (iterable, /* optional */ sentinel) { /***  Convert the given argument to an iterator (object implementing "next").  1. If iterable is an iterator (implements "next"), then it will be returned as-is. 2. If iterable is an iterator factory (implements "iter"), then the result of iterable.iter() will be returned. 3. Otherwise, the iterator factory registry is used to find a match. 4. If no factory is found, it will throw TypeError  When used directly, using an iterator should look like this::  var it = iter(iterable); try { while (var o = it.next()) {  } } catch (e) { if (e != StopIteration) { throw e; }  }  ***/  var self = MochiKit.Iter; if (arguments.length == 2) { return self.takewhile( function (a) { return a != sentinel; }, iterable ); } if (typeof(iterable.next) == 'function') { return iterable; } else if (typeof(iterable.iter) == 'function') { return iterable.iter(); } try { return self.iteratorRegistry.match(iterable); } catch (e) { var m = MochiKit.Base; if (e == m.NotFound) { e = new TypeError(typeof(iterable) + ": " + m.repr(iterable) + " is not iterable"); } throw e; } }, 
add: },iter:function(_130,_131){ var self=MochiKit.Iter; if(arguments.length==2){ return self.takewhile(function(a){ return a!=_131; },_130); } if(typeof (_130.next)=="function"){ return _130; }else{ if(typeof (_130.iter)=="function"){ return _130.iter(); } } try{ return self.iteratorRegistry.match(_130); } catch(e){ var m=MochiKit.Base; if(e==m.NotFound){ e=new TypeError(typeof (_130)+": "+m.repr(_130)+" is not iterable"); } throw e; } },count:function(n){ 
context:     iter: function (iterable, /* optional */ sentinel) {        /***            Convert the given argument to an iterator (object implementing            "next").            1. If iterable is an iterator (implements "next"), then it will be               returned as-is.            2. If iterable is an iterator factory (implements "iter"), then the               result of iterable.iter() will be returned.            3. Otherwise, the iterator factory registry is used to find a               match.            4. If no factory is found, it will throw TypeError            When used directly, using an iterator should look like this::                var it = iter(iterable);                try {                    while (var o = it.next()) {                        // use o                    }                } catch (e) {                    if (e != StopIteration) {                        throw e;                    }                    // pass                }        ***/        var self = MochiKit.Iter;        if (arguments.length == 2) {            return self.takewhile(                function (a) { return a != sentinel; },                iterable            );        }        if (typeof(iterable.next) == 'function') {            return iterable;        } else if (typeof(iterable.iter) == 'function') {            return iterable.iter();        }        try {            return self.iteratorRegistry.match(iterable);        } catch (e) {            var m = MochiKit.Base;            if (e == m.NotFound) {                e = new TypeError(typeof(iterable) + ": " + m.repr(iterable) + " is not iterable");            }            throw e;        }    },
meta: 8607	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8607/ad067b3f5d648d6df90ec6fb2b79f0027612a307/MochiKit.js/buggy/trunk/lib/MochiKit.js