time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (597B)


      1 
      2 {{alias}}( fcn, indices[, thisArg] )
      3     Returns a function that invokes a provided function with reordered
      4     arguments.
      5 
      6     Parameters
      7     ----------
      8     fcn: Function
      9         Input function.
     10 
     11     indices: Array<integer>
     12         Argument indices.
     13 
     14     thisArg: any (optional)
     15         Function context.
     16 
     17     Returns
     18     -------
     19     out: Function
     20         Function with reordered arguments.
     21 
     22     Examples
     23     --------
     24     > function foo( a, b, c ) { return [ a, b, c ]; };
     25     > var bar = {{alias}}( foo, [ 2, 0, 1 ] );
     26     > var out = bar( 1, 2, 3 )
     27     [ 3, 1, 2 ]
     28 
     29     See Also
     30     --------
     31