pombreda / base2

Automatically exported from code.google.com/p/base2
0 stars 0 forks source link

Use the Array2 constructor to cast arguments #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice if the Array2 constructor could be used to cast the arguments 
"array" within an 
function. Now the base2.slice function can be used to access array-like methods 
on the arguments 
array. 

The Array2 constructor cast syntax is however a more obvious syntax.

//Error
function() { Array2(arguments).shift() }

//OK
function() { slice(arguments).shift() }

Original issue reported on code.google.com by doek...@gmail.com on 6 Jan 2008 at 5:08

GoogleCodeExporter commented 9 years ago
You should use Array2.copy(arguments) to do this.

Original comment by dean.edw...@gmail.com on 17 Aug 2008 at 3:54