Skip to content

Commit 7bfeb06

Browse files
committed
style: minor clean-up
1 parent d088c85 commit 7bfeb06

File tree

4 files changed

+11
-21
lines changed

4 files changed

+11
-21
lines changed

lib/node_modules/@stdlib/math/iter/ops/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,12 @@ console.log( itSub.next().value );
101101
console.log( itSub.next().value );
102102
// => -1.0
103103

104-
// Demonstrate operation with iterator and constant
105-
var it3 = array2iterator( [ 1.0, 2.0 ] );
106-
var itWithConstant = ns.iterAdd( it3, 3.0 );
104+
// Demonstrate broadcasting:
105+
var itAdd3 = ns.iterAdd( array2iterator( [ 1.0, 2.0 ] ), 3.0 );
107106

108-
console.log( itWithConstant.next().value );
107+
console.log( itAdd3.next().value );
109108
// => 4.0
110-
console.log( itWithConstant.next().value );
109+
console.log( itAdd3.next().value );
111110
// => 5.0
112111
```
113112

lib/node_modules/@stdlib/math/iter/ops/examples/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,10 @@ console.log( itSub.next().value );
5353
console.log( itSub.next().value );
5454
// => -1.0
5555

56-
// Demonstrate operation with iterator and constant
57-
var it3 = array2iterator( [ 1.0, 2.0 ] );
58-
var itWithConstant = ns.iterAdd( it3, 3.0 );
56+
// Demonstrate broadcasting:
57+
var itAdd3 = ns.iterAdd( array2iterator( [ 1.0, 2.0 ] ), 3.0 );
5958

60-
console.log( itWithConstant.next().value );
59+
console.log( itAdd3.next().value );
6160
// => 4.0
62-
console.log( itWithConstant.next().value );
61+
console.log( itAdd3.next().value );
6362
// => 5.0

lib/node_modules/@stdlib/math/iter/sequences/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,9 @@ var squares = ns.iterSquaresSeq();
9797
var cubes = ns.iterCubesSeq();
9898

9999
// Iterate over both sequences and log the first five pairs:
100-
var square;
101-
var cube;
102100
var i;
103101
for ( i = 0; i < 5; i++ ) {
104-
square = squares.next().value;
105-
cube = cubes.next().value;
106-
console.log( 'Square: %d, Cube: %d', square, cube );
102+
console.log( 'Square: %d, Cube: %d', squares.next().value, cubes.next().value );
107103
}
108104

109105
// Calculate the sum of the first ten Fibonacci numbers:

lib/node_modules/@stdlib/math/iter/sequences/examples/index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,16 @@
1818

1919
'use strict';
2020

21-
var ns = require('./../lib');
21+
var ns = require( './../lib' );
2222

2323
// Create iterators for generating square and cube numbers:
2424
var squares = ns.iterSquaresSeq();
2525
var cubes = ns.iterCubesSeq();
2626

2727
// Iterate over both sequences and log the first five pairs:
28-
var square;
29-
var cube;
3028
var i;
3129
for ( i = 0; i < 5; i++ ) {
32-
square = squares.next().value;
33-
cube = cubes.next().value;
34-
console.log( 'Square: %d, Cube: %d', square, cube );
30+
console.log( 'Square: %d, Cube: %d', squares.next().value, cubes.next().value );
3531
}
3632

3733
// Calculate the sum of the first 10 Fibonacci numbers:

0 commit comments

Comments
 (0)