Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion lib/node_modules/@stdlib/math/iter/special/examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,16 @@
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( './../lib' );

console.log( objectKeys( ns ) );
// Example showcasing the use of a function from the math/iter/special namespace
var iterSqrt = ns.iterSqrt;
var array = [1, 4, 9, 16];
var it = iterSqrt( array );

var v;
while ( ( v = it.next().value ) ) {
console.log( v );
}
// => 1
// => 2
// => 3
// => 4