michael@0: // Map(x) throws if x is not iterable (unless x is undefined). michael@0: michael@0: load(libdir + "asserts.js"); michael@0: var nonIterables = [null, true, 1, -0, 3.14, NaN, {}, Math, this]; michael@0: for (let k of nonIterables) michael@0: assertThrowsInstanceOf(function () { Map(k); }, TypeError);