diff --git a/lib/node_modules/@stdlib/iter/cartesian-square/README.md b/lib/node_modules/@stdlib/iter/cartesian-square/README.md new file mode 100644 index 000000000000..56fc4973cf13 --- /dev/null +++ b/lib/node_modules/@stdlib/iter/cartesian-square/README.md @@ -0,0 +1,154 @@ + + +# iterCartesianSquare + +> Create an [iterator][mdn-iterator-protocol] which iteratively computes the Cartesian square. + + + +
+ +
+ + + + + +
+ +## Usage + +```javascript +var iterCartesianSquare = require( '@stdlib/iter/cartesian-square' ); +``` + +#### iterCartesianSquare( x ) + +Returns an [iterator][mdn-iterator-protocol] of the Cartesian square. + +```javascript +var x = [ 1, 2 ]; + +var iter = iterCartesianSquare( x ); +// returns + +var v = iter.next().value; +// returns [ 1, 1 ] + +v = iter.next().value; +// returns [ 1, 2 ] + +v = iter.next().value; +// returns [ 2, 1 ] + +// ... +``` + +The returned [iterator][mdn-iterator-protocol] protocol-compliant object has the following properties: + +- **next**: function which returns an [iterator][mdn-iterator-protocol] protocol-compliant object containing the next iterated value (if one exists) assigned to a `value` property and a `done` property having a `boolean` value indicating whether the [iterator][mdn-iterator-protocol] is finished. +- **return**: function which closes an [iterator][mdn-iterator-protocol] and returns a single (optional) argument in an [iterator][mdn-iterator-protocol] protocol-compliant object. + + + + + + + +
+ +## Notes + +- If an environment supports `Symbol.iterator` **and** a provided [iterator][mdn-iterator-protocol] is iterable, the returned [iterator][mdn-iterator-protocol] is iterable. + +
+ + + + + +
+ +## Examples + + + +```javascript +var linspace = require( '@stdlib/array/linspace' ); +var iterCartesianSquare = require( '@stdlib/iter/cartesian-square' ); + +var x = linspace( 0, 5, 6 ); + +// Create an iterator which iteratively computes the Cartesian square: +var it = iterCartesianSquare( x ); + +// Perform manual iteration... +var v; +while ( true ) { + v = it.next(); + if ( v.done ) { + break; + } + console.log( v.value ); +} +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/iter/cartesian-square/benchmark/benchmark.js b/lib/node_modules/@stdlib/iter/cartesian-square/benchmark/benchmark.js new file mode 100644 index 000000000000..539c2aea0420 --- /dev/null +++ b/lib/node_modules/@stdlib/iter/cartesian-square/benchmark/benchmark.js @@ -0,0 +1,78 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var randu = require( '@stdlib/random/base/randu' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var isIteratorLike = require( '@stdlib/assert/is-iterator-like' ); +var linspace = require( '@stdlib/array/linspace' ); +var ceil = require( '@stdlib/math/base/special/ceil' ); +var sqrt = require( '@stdlib/math/base/special/sqrt' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var iterCartesianSquare = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var iter; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + iter = iterCartesianSquare( linspace( randu(), randu(), 100 ) ); + if ( typeof iter !== 'object' ) { + b.fail( 'should return an object' ); + } + } + b.toc(); + if ( !isIteratorLike( iter ) ) { + b.fail( 'should return an iterator protocol-compliant object' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( format( '%s::iteration', pkg ), function benchmark( b ) { + var iter; + var z; + var i; + var x; + + x = linspace( randu(), randu(), ceil(sqrt(b.iterations)) + 1 ); + iter = iterCartesianSquare( x ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + z = iter.next().value; + if ( isnan( z ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( z ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/iter/cartesian-square/docs/repl.txt b/lib/node_modules/@stdlib/iter/cartesian-square/docs/repl.txt new file mode 100644 index 000000000000..c7c2b1b4f59a --- /dev/null +++ b/lib/node_modules/@stdlib/iter/cartesian-square/docs/repl.txt @@ -0,0 +1,36 @@ + +{{alias}}( iterator ) + Returns an iterator of the Cartesian square. + + If an environment supports Symbol.iterator and a provided iterator is + iterable, the returned iterator is iterable. + + Parameters + ---------- + iterator: Collection + Input collection. + + Returns + ------- + iterator: Object + Iterator. + + iterator.next(): Function + Returns an iterator protocol-compliant object containing the next + iterated value (if one exists) and a boolean flag indicating whether the + iterator is finished. + + iterator.return( [value] ): Function + Finishes an iterator and returns a provided value. + + Examples + -------- + > var it = {{alias}}( [ 1, 2 ] ); + > var v = it.next().value + [ 1, 1 ] + > v = it.next().value + [ 1, 2 ] + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/iter/cartesian-square/docs/types/index.d.ts b/lib/node_modules/@stdlib/iter/cartesian-square/docs/types/index.d.ts new file mode 100644 index 000000000000..babc35aada9b --- /dev/null +++ b/lib/node_modules/@stdlib/iter/cartesian-square/docs/types/index.d.ts @@ -0,0 +1,57 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/// + +import { Iterator as Iter, IterableIterator } from '@stdlib/types/iter'; +import { ArrayLike } from '@stdlib/types/array'; + +// Define a union type representing both iterable and non-iterable iterators: +type Iterator = Iter | IterableIterator; + +/** +* Returns an iterator which iteratively computes the Cartesian square. +* +* @param x - input array +* @throws {TypeError} first argument must be a collection +* @returns iterator +* +* @example +* var x = [ 1, 2 ]; +* +* var iter = iterCartesianSquare( x ); +* +* var v = iter.next().value; +* // returns [ 1, 1 ] +* +* v = iter.next().value; +* // returns [ 1, 2 ] +* +* v = iter.next().value; +* // returns [ 2, 1 ] +* +* // ... +*/ +declare function iterCartesianSquare( x: ArrayLike & object ): Iterator; + + +// EXPORTS // + +export = iterCartesianSquare; diff --git a/lib/node_modules/@stdlib/iter/cartesian-square/docs/types/test.ts b/lib/node_modules/@stdlib/iter/cartesian-square/docs/types/test.ts new file mode 100644 index 000000000000..7623a509f8bc --- /dev/null +++ b/lib/node_modules/@stdlib/iter/cartesian-square/docs/types/test.ts @@ -0,0 +1,43 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import iterCartesianSquare = require( './index' ); + +// TESTS // + +// The function returns an iterator... +{ + iterCartesianSquare( [ 1, 2 ] ); // $ExpectType Iterator +} + +// The compiler throws an error if the function is provided a value other than an iterator protocol-compliant object... +{ + iterCartesianSquare( '5' ); // $ExpectError + iterCartesianSquare( 5 ); // $ExpectError + iterCartesianSquare( NaN ); // $ExpectError + iterCartesianSquare( true ); // $ExpectError + iterCartesianSquare( false ); // $ExpectError + iterCartesianSquare( null ); // $ExpectError + iterCartesianSquare( undefined ); // $ExpectError + iterCartesianSquare( {} ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + iterCartesianSquare(); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/iter/cartesian-square/examples/index.js b/lib/node_modules/@stdlib/iter/cartesian-square/examples/index.js new file mode 100644 index 000000000000..c175e5e52938 --- /dev/null +++ b/lib/node_modules/@stdlib/iter/cartesian-square/examples/index.js @@ -0,0 +1,37 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var linspace = require( '@stdlib/array/linspace' ); +var iterCartesianSquare = require( './../lib' ); + +var x = linspace( 0, 5, 6 ); + +// Create an iterator which iteratively computes the Cartesian square: +var it = iterCartesianSquare( x ); + +// Perform manual iteration... +var v; +while ( true ) { + v = it.next(); + if ( v.done ) { + break; + } + console.log( v.value ); +} diff --git a/lib/node_modules/@stdlib/iter/cartesian-square/lib/index.js b/lib/node_modules/@stdlib/iter/cartesian-square/lib/index.js new file mode 100644 index 000000000000..f93ba37235f0 --- /dev/null +++ b/lib/node_modules/@stdlib/iter/cartesian-square/lib/index.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Create an iterator of the Cartesian square. +* +* @module @stdlib/iter/cartesian-square +* +* @example +* var iterCartesianSquare = require( '@stdlib/iter/cartesian-square' ); +* +* var x = [ 1, 2 ]; +* +* var iter = iterCartesianSquare( x ); +* +* var v = iter.next().value; +* // returns [ 1, 1 ] +* +* v = iter.next().value; +* // returns [ 1, 2 ] +* +* v = iter.next().value; +* // returns [ 2, 1 ] +* +* // ... +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/iter/cartesian-square/lib/main.js b/lib/node_modules/@stdlib/iter/cartesian-square/lib/main.js new file mode 100644 index 000000000000..15e8feb353c6 --- /dev/null +++ b/lib/node_modules/@stdlib/iter/cartesian-square/lib/main.js @@ -0,0 +1,139 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var isFunction = require( '@stdlib/assert/is-function' ); +var isCollection = require( '@stdlib/assert/is-collection' ); +var iteratorSymbol = require( '@stdlib/symbol/iterator' ); +var format = require( '@stdlib/string/format' ); +var resolveGetter = require( '@stdlib/array/base/resolve-getter' ); +var floor = require( '@stdlib/math/base/special/floor' ); + + +// MAIN // + +/** +* Returns an iterator of the Cartesian square. +* +* @param {Collection} x - input array +* @throws {TypeError} first argument must be a collection +* @returns {Iterator} iterator of ordered tuples comprising the Cartesian product +* +* @example +* var x = [ 1, 2 ]; +* +* var iter = iterCartesianSquare( x ); +* +* var v = iter.next().value; +* // returns [ 1, 1 ] +* +* v = iter.next().value; +* // returns [ 1, 2 ] +* +* v = iter.next().value; +* // returns [ 2, 1 ] +* +* // ... +*/ +function iterCartesianSquare( x ) { + var iter; + var FLG; + var get; + var i; + if ( !isCollection( x ) ) { + throw new TypeError( format( 'invalid argument. First argument must be an array-like object. Value: `%s`.', x ) ); + } + get = resolveGetter( x ); + i = 0; + + // Create an iterator protocol-compliant object: + iter = {}; + setReadOnly( iter, 'next', next ); + setReadOnly( iter, 'return', end ); + + // If an environment supports `Symbol.iterator` and a provided iterator is iterable, make the iterator iterable: + if ( iteratorSymbol && isFunction( x[ iteratorSymbol ] ) ) { + setReadOnly( iter, iteratorSymbol, factory ); + } + return iter; + + /** + * Returns an iterator protocol-compliant object containing the next iterated value. + * + * @private + * @returns {Object} iterator protocol-compliant object + */ + function next() { + var N; + var v; + if ( FLG ) { + return { + 'done': true + }; + } + N = x.length * x.length; + v = [ get(x, floor(i / x.length)), get(x, i % x.length) ]; + i += 1; + if ( i >= N ) { + FLG = true; + } + return { + 'value': v, + 'done': false + }; + } + + /** + * Finishes an iterator. + * + * @private + * @param {*} [value] - value to return + * @returns {Object} iterator protocol-compliant object + */ + function end( value ) { + FLG = true; + if ( arguments.length ) { + return { + 'value': value, + 'done': true + }; + } + return { + 'done': true + }; + } + + /** + * Returns a new iterator. + * + * @private + * @returns {Iterator} iterator + */ + function factory() { + return iterCartesianSquare( x[ iteratorSymbol ]() ); + } +} + + +// EXPORTS // + +module.exports = iterCartesianSquare; diff --git a/lib/node_modules/@stdlib/iter/cartesian-square/package.json b/lib/node_modules/@stdlib/iter/cartesian-square/package.json new file mode 100644 index 000000000000..859e286200e0 --- /dev/null +++ b/lib/node_modules/@stdlib/iter/cartesian-square/package.json @@ -0,0 +1,69 @@ +{ + "name": "@stdlib/iter/cartesian-square", + "version": "0.0.0", + "description": "Create an iterator of the Cartesian square.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdutils", + "stdutil", + "utilities", + "utility", + "utils", + "util", + "linspace", + "linear", + "sequence", + "monotonic", + "arange", + "range", + "iterator", + "iterable", + "iterate" + ] +} diff --git a/lib/node_modules/@stdlib/iter/cartesian-square/test/test.js b/lib/node_modules/@stdlib/iter/cartesian-square/test/test.js new file mode 100644 index 000000000000..4840986b107c --- /dev/null +++ b/lib/node_modules/@stdlib/iter/cartesian-square/test/test.js @@ -0,0 +1,225 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var proxyquire = require( 'proxyquire' ); +var linspace = require( '@stdlib/array/linspace' ); +var iteratorSymbol = require( '@stdlib/symbol/iterator' ); +var iterCartesianSquare = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof iterCartesianSquare, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function throws an error if provided an argument which is not a collection', function test( t ) { + var values; + var i; + + values = [ + '5', + 5, + NaN, + true, + false, + null, + void 0, + {} + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + iterCartesianSquare( value ); + }; + } +}); + +tape( 'the function returns an iterator protocol-compliant object (cartesian-square)', function test( t ) { + var expected; + var values; + var actual; + var it; + var v; + + values = [ 1, 2 ]; + expected = [ + { + 'value': [ 1, 1 ], + 'done': false + }, + { + 'value': [ 1, 2 ], + 'done': false + }, + { + 'value': [ 2, 1 ], + 'done': false + }, + { + 'value': [ 2, 2 ], + 'done': false + }, + { + 'done': true + } + ]; + + it = iterCartesianSquare( values ); + t.strictEqual( it.next.length, 0, 'has zero arity' ); + + actual = []; + while ( true ) { + v = it.next(); + if ( v.done ) { + break; + } + actual.push( v ); + } + actual.push( it.next() ); + + t.deepEqual( actual, expected, 'returns expected values' ); + t.end(); +}); + +tape( 'the returned iterator has a `return` method for closing an iterator (no argument)', function test( t ) { + var it; + var r; + + it = iterCartesianSquare( linspace( 0, 5, 6 ) ); + + r = it.next(); + t.strictEqual( typeof r.value, 'object', 'returns expected value' ); + t.strictEqual( r.done, false, 'returns expected value' ); + + r = it.next(); + t.strictEqual( typeof r.value, 'object', 'returns expected value' ); + t.strictEqual( r.done, false, 'returns expected value' ); + + r = it.return(); + t.strictEqual( r.value, void 0, 'returns expected value' ); + t.strictEqual( r.done, true, 'returns expected value' ); + + r = it.next(); + t.strictEqual( r.value, void 0, 'returns expected value' ); + t.strictEqual( r.done, true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the returned iterator has a `return` method for closing an iterator (argument)', function test( t ) { + var it; + var r; + + it = iterCartesianSquare( linspace( 0, 5, 6 ) ); + + r = it.next(); + t.strictEqual( typeof r.value, 'object', 'returns expected value' ); + t.strictEqual( r.done, false, 'returns expected value' ); + + r = it.next(); + t.strictEqual( typeof r.value, 'object', 'returns expected value' ); + t.strictEqual( r.done, false, 'returns expected value' ); + + r = it.return( 'finished' ); + t.strictEqual( r.value, 'finished', 'returns expected value' ); + t.strictEqual( r.done, true, 'returns expected value' ); + + r = it.next(); + t.strictEqual( r.value, void 0, 'returns expected value' ); + t.strictEqual( r.done, true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if an environment supports `Symbol.iterator` and the provided iterator is iterable, the returned iterator is iterable', function test( t ) { + var iterCartesianSquare; + var it1; + var it2; + var x; + var i; + + iterCartesianSquare = proxyquire( './../lib/main.js', { + '@stdlib/symbol/iterator': '__ITERATOR_SYMBOL__' + }); + + x = linspace( 0, 5, 6 ); + x[ '__ITERATOR_SYMBOL__' ] = factory; + + it1 = iterCartesianSquare( x ); + t.strictEqual( typeof it1[ '__ITERATOR_SYMBOL__' ], 'function', 'has method' ); + t.strictEqual( it1[ '__ITERATOR_SYMBOL__' ].length, 0, 'has zero arity' ); + + it2 = it1[ '__ITERATOR_SYMBOL__' ](); + t.strictEqual( typeof it2, 'object', 'returns expected value' ); + t.strictEqual( typeof it2.next, 'function', 'has method' ); + t.strictEqual( typeof it2.return, 'function', 'has method' ); + + for ( i = 0; i < 100; i++ ) { + t.deepEqual( it2.next().value, it1.next().value, 'returns expected value' ); + } + t.end(); + + function factory() { + return linspace( 0, 5, 6 ); + } +}); + +tape( 'if an environment does not support `Symbol.iterator`, the returned iterator is not "iterable"', function test( t ) { + var iterCartesianSquare; + var it; + + iterCartesianSquare = proxyquire( './../lib/main.js', { + '@stdlib/symbol/iterator': false + }); + + it = iterCartesianSquare( linspace( 0, 5, 6 ) ); + t.strictEqual( it[ iteratorSymbol ], void 0, 'does not have property' ); + + t.end(); +}); + +tape( 'if a provided iterator is not iterable, the returned iterator is not iterable', function test( t ) { + var iterCartesianSquare; + var it; + var x; + + iterCartesianSquare = proxyquire( './../lib/main.js', { + '@stdlib/symbol/iterator': '__ITERATOR_SYMBOL__' + }); + + x = linspace( 0, 5, 6 ); + x[ '__ITERATOR_SYMBOL__' ] = null; + + it = iterCartesianSquare( x ); + t.strictEqual( it[ iteratorSymbol ], void 0, 'does not have property' ); + + t.end(); +});