(reversed [list])
This commit is contained in:
@@ -57,6 +57,7 @@ class Kiss {
|
||||
"groups" => Symbol("Prelude.groups"),
|
||||
"zip" => Symbol("Prelude.zip"),
|
||||
"pairs" => Symbol("Prelude.pairs"), // TODO test pairs
|
||||
"reversed" => Symbol("Prelude.reversed"), // TODO test reversed
|
||||
"memoize" => Symbol("Prelude.memoize"), // TODO test memoize
|
||||
"symbolName" => Symbol("Prelude.symbolName"),
|
||||
"symbol" => Symbol("Prelude.symbol"),
|
||||
|
@@ -216,6 +216,12 @@ class Prelude {
|
||||
return zip(l1, l2);
|
||||
}
|
||||
|
||||
public static function reversed<T>(l:kiss.List<T>):kiss.List<T> {
|
||||
var c = l.copy();
|
||||
c.reverse();
|
||||
return c;
|
||||
}
|
||||
|
||||
// Ranges with a min, exclusive max, and step size, just like Python.
|
||||
public static function range(min, max, step):Iterator<Int> {
|
||||
if (step <= 0)
|
||||
|
Reference in New Issue
Block a user