Skip to content

Commit ca93264

Browse files
committed
Move return annotation to example
1 parent db985dd commit ca93264

File tree

1 file changed

+17
-15
lines changed
  • lib/node_modules/@stdlib/utils/flatten-array/lib

1 file changed

+17
-15
lines changed

lib/node_modules/@stdlib/utils/flatten-array/lib/gen_fcn.js

+17-15
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,23 @@
2424
* @private
2525
* @param {PositiveIntegerArray} dims - dimensions
2626
* @returns {Function} flatten function
27+
*
28+
* @example
29+
* var fun = getFcn( 2 );
30+
* /*
31+
* * returns
32+
* *
33+
* * function flattenArray( x ) {
34+
* * var o = [];
35+
* * var i0, i1;
36+
* * for ( i0 = 0; i0 < 2; i0++ ) {
37+
* * for ( i1 = 0; i1 < 2; i1++ ) {
38+
* * o.push( x[i0][i1] );
39+
* * }
40+
* * }
41+
* * return o;
42+
* * }
43+
* *\/
2744
*/
2845
function genFcn( dims ) {
2946
var len;
@@ -73,21 +90,6 @@ function genFcn( dims ) {
7390

7491
// Create the function in the global scope:
7592
return ( new Function( f ) )(); // eslint-disable-line no-new-func
76-
77-
/*
78-
* e.g., returns
79-
*
80-
* function flattenArray( x ) {
81-
* var o = [];
82-
* var i0, i1;
83-
* for ( i0 = 0; i0 < 2; i0++ ) {
84-
* for ( i1 = 0; i1 < 2; i1++ ) {
85-
* o.push( x[i0][i1] );
86-
* }
87-
* }
88-
* return o;
89-
* }
90-
*/
9193
}
9294

9395

0 commit comments

Comments
 (0)