4 __generic: function (t, a) {
5 var count = 0, first, last, x, icount = this.length;
6 t.call(this, function (item, index, col) {
13 a(index, --icount, "Index");
15 a(count, this.length, "Iterated");
16 a(first, this[this.length - 1], "First is last");
17 a(last, this[0], "Last is first");
18 a.deep(x, Object(this), "Collection as third argument"); //jslint: skip
22 t.call([1], function () { y = this; }, x);
25 t.call([3, 4, 4], function (a, i) { y += i; });
32 a(t.call(x, function (a, i) { ++count; y += i; }), false, "Return");
33 a(y, 6, "Misssing Indexes");
34 a(count, 3, "Misssing Indexes, count");
37 a(t.call([-2, -3, -4, 2, -5], function (item) {
41 a(count, 2, "Break after true is returned");