(rest [list])

This commit is contained in:
2020-12-07 19:16:22 -07:00
parent 907affa41a
commit a564fe146a
3 changed files with 12 additions and 2 deletions

View File

@@ -250,6 +250,10 @@ class BasicTestCase extends Test {
function testRange() {
_testRange();
}
function testRest() {
_testRest();
}
}
class BasicObject {

View File

@@ -367,4 +367,7 @@
(set myList (for i (range 7 17 2) i))
(Assert.equals 7 (first myList))
(Assert.equals 9 (second myList))
(Assert.equals 15 (last myList)))
(Assert.equals 15 (last myList)))
(defun _testRest []
(Assert.equals (.toString [2 3 4]) (.toString (rest [1 2 3 4]))))