clever-lang/clever — Issue #87: Add a slice Method to Array Base type
Author: pedrofaria
Created: 2012-01-31 05:51:05+00:00
State: open

What do you think about a slice method for Array types?

```
Array a;

a.push(10);
a.push(9);
a.push(8);
a.push(7);

// Array.slice(start, length);
Array b = a.slice(1, 2);

println( b.toString() );
// output: [9, 8]

println( a.slice(2).toString() );
// output: [8, 7]

println( a.slice(1, -1).toString() );
// output: [9, 8]

```

Opinions?