end FUNCTION reduce() 
FUNCTION: transform( data )
Defines the data transformation.

@private
@param {Object} data - stream data
@returns {Number} transformed data
320668
function transform( data ) {
		var N = data.N,
			g;

		// Population skewness:
		g = Math.sqrt( N )*data.M3 / Math.pow( data.M2, 3/2 );

		// Sample skewness correction:
		return Math.sqrt( N*N-1)*g / (N-2);
	}
324458
function(value)
	{
		var keys = this.getKeys(value);
		var output = null;
		var i;
		var len = keys.length;

		// array
		if ( value instanceof Array )
			/*( 1 == len && '0' == keys[0] )
			||
			( len > 1 && this.reduceArray(keys, function(v,w){return Math.floor(v+w);}, 0) == len * (len - 1) / 2) )*/
		{
			output = [];
			for ( i = 0; i < len; i++ )
			{
				output.push(this.dump(value[keys[i]]));
			}

			return '['+output.join(', ')+']';
		}

		// mapping
		output = [];
		for ( i = 0; i < len; i++ )
		{
			output.push(this.dump(keys[i])+': '+this.dump(value[keys[i]]));
		}

		return '{ '+output.join(', ')+' }';
	}
920132
function onData(W) {
        var buffer = getBuffer(W),
            full = false,
            dropVal,
            sum = 0,
            delta = 0,
            N = 0;

        /**
        * FUNCTION: onData(newVal, encoding, clbk)
        *   Data event handler. Calculates the moving sum.
        *
        * @private
        * @param {Number} newVal - streamed data value
        * @param {String} encoding
        * @param {Function} clbk - callback to invoke after finding a sum. Function accepts two arguments: [ error, chunk ].
        */
        return function onData(newVal, encoding, clbk) {
            // Fill buffer of size W
            if (!full) {
                buffer[N] = newVal;

                sum += newVal;
                N += 1;

                if (N===W) {
                    full = true;
                    this.push(sum);
                }
                clbk();
                return;
            }

            // Update buffer: (drop old value, add new)
            dropVal = buffer.shift();
            buffer.push(newVal);

            // Calculate moving sum:
            delta = newVal - dropVal;
            sum += delta;

            clbk(null, sum);
        }; // end FUNCTION onData(newVal)
    }
663626
function transform (stream, target) {
  const filter = {
    scripts: $.filter((file) => /\.jsx?$/.test(file.path), { restore: true }),
    styles: $.filter((file) => /\.styl$/.test(file.path), { restore: true })
  }

  return stream
  .pipe($.plumber(::console.error))

  // scripts
  .pipe(filter.scripts)
    .pipe($.sourcemaps.init())
      // include inline styles
      .pipe($.replaceRelative(/require\('\.\/(.*?\.styl')\)/g, (file, match, callback) => {
        const includePath = match.match(/\('(.*?\.styl)'\)/)[1]
        readFile(path.resolve(path.dirname(file.path), includePath), (error, data) => {
          const css = stylus(data.toString()).render()
          postcss([
            autoprefixer({
              browsers: ['last 2 versions']
            }),
            cssnano
          ])
          .process(css)
          .then(function (result) {
            return callback(`"${result.css}"`)
          })
        })
      }))
      .pipe($.babel({/** see .babelrc **/}))
    .pipe($.sourcemaps.write())
  .pipe(filter.scripts.restore)

  // styles
  .pipe(filter.styles)
    .pipe($.stylus())
    .pipe($.postcss([
      autoprefixer({
        browsers: ['last 2 versions']
      })
    ]))
  .pipe(filter.styles.restore)

  .pipe($.plumber.stop())
  .pipe(gulp.dest(target))
}
540942
function Stream( value, options ) {
		if ( !arguments.length ) {
			throw new Error( 'Stream()::insufficient input arguments. Must provide a value to append.' );
		}
		if ( arguments.length < 2 ) {
			options = {};
		}
		if ( !( this instanceof Stream ) ) {
			return new Stream( value, options );
		}
		var err = validate( options );
		if ( err ) {
			throw err;
		}

		Transform.call( this, options );
		this._val = value.toString();
		this._destroyed = false;

		return this;
	}
418752
function reduce(parent$, fn, startValue) {
  let aggregate = startValue;
  let newStream = stream();
  function reduceValue(value) {
    aggregate = fn(aggregate, parent$.value);
    newStream(aggregate);
  }
  if (parent$.value !== undefined) {
    reduceValue(parent$.value);
  }
  parent$.listeners.push(reduceValue);
  return newStream;
}
742979
function reduceit(v, i) {
    if (i >= this.rmin) {
      return undefined;
    }
    this.accumulater[i] += (v / this.scale[i]);
    return this.accumulater[i];
  }
404511
function Transformer( file, res ) {
			stream.Transform.call( this );

			this.file = file;
			this.res = res;
			this.chunks = [];
		}
296798
function transformAllFiles(transform, flush) {
  var files = [];

  return through.obj(
    function(file, enc, cb) {
      if (file.isStream()) {
        this.emit('error', new gutil.PluginError(PLUGIN_NAME, 'Streams are not supported!'));
        return cb();
      }

      if (file.isBuffer()) {
        if (transform) transform.call(this, file, enc);
      }

      files.push(file);
      cb();
    },
    function(cb) {
      if (flush) files = flush.call(this, files);
      for (var i = 0; i < files.length; ++i) {
        this.push(files[i]);
      }
      cb();
    }
  );
}
305851
def transform(self, dstreams, transformFunc):
        
        jdstreams = [d._jdstream for d in dstreams]
        # change the final serializer to sc.serializer
        func = TransformFunction(self._sc,
                                 lambda t, *rdds: transformFunc(rdds),
                                 *[d._jrdd_deserializer for d in dstreams])
        jfunc = self._jvm.TransformFunction(func)
        jdstream = self._jssc.transform(jdstreams, jfunc)
        return DStream(jdstream, self, self._sc.serializer)
1070282
function transform(chunk, encoding, cb) {
    // Allow objects straight through
    if (_.isPlainObject(chunk)) return cb(null, chunk);

    async.eachSeries(
      tokenize(chunk.toString('utf8')),
      (output, next) => transclude.call(this, output, next),
      err => {
        if (err) inputBuffer = '';
        cb(err);
      }
    );
  }
1053687
function reduce(arr, iter, base) {
    arr = Immutable.Iterable.isIterable(arr)? arr : Immutable.List(arr);

    return arr.reduce(function(prev, elem, key) {
        return prev
        .then(function(val) {
            return iter(val, elem, key);
        });
    }, Q(base));
}
590634
def _transform(self, data, transform, step_size):
    '''
    
    '''
    if transform=='mean':
      total = sum( data )
      count = len( data )
      data = float(total)/float(count) if count>0 else 0
    elif transform=='count':
      data = len(data)
    elif transform=='min':
      data = min(data or [0])
    elif transform=='max':
      data = max(data or [0])
    elif transform=='sum':
      data = sum(data)
    elif transform=='rate':
      data = len(data) / float(step_size)
    elif callable(transform):
      data = transform(data)
    return data
707187
function() {
            return _.reduce(this.items, function(n, item) {
                if (this.applyFilter(item)) {
                    n = n + 1;
                }
                return n;
            }, 0, this);
        }
438882
function emitData() {
      for(var i=0;i<streamQueue.length;i++) {
        var dataQueue = streamQueue[i].dataQueue;

        if(streamQueue[i].pending) {
          return;
        }

        for(var j=0;j<dataQueue.length;j++) {
          var data = dataQueue[j];
          if(!!data) {
            _this.emit('data', data);
            dataQueue[j] = null;

            return emitData();
          }
        }
      }

      if(currentStream === streamQueue.length) {
        _this.emit('end');
      }
    }
1299974
def _transform(self, data, transform, step_size):
    '''
    
    '''
    if callable(transform):
      data = transform(data, step_size)
    return data
657068
function transform(value) {
	if(typeof value === 'function') value = value()
  if(value instanceof Array) {
    var el = document.createDocumentFragment()
    value.map(item => el.appendChild(transform(item)))
    value = el
  } else if(typeof value === 'object') {
		if(typeof value.then === 'function') {
			var tmp = document.createTextNode('')
			value.then(function(data) {
				tmp.parentElement.replaceChild(transform(data), tmp)
			})
			value = tmp
		} else if(typeof value.on === 'function') {
			var tmp = document.createTextNode('')
			value.on('data', function(data) {
				// need to transform? Streams are only text?
				tmp.parentElement.insertBefore(document.createTextNode(data), tmp)
			})
			value = tmp
		}
	} else value = document.createTextNode(value)
	return value
}