(reversed [list])

This commit is contained in:
2021-06-23 17:18:07 -06:00
parent fe85c15060
commit 23364c1a7a
2 changed files with 7 additions and 0 deletions

View File

@@ -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)