summaryrefslogtreecommitdiff
path: root/lib/iter
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-12-30 20:10:45 -0800
committerOri Bernstein <ori@eigenstate.org>2017-12-30 20:10:45 -0800
commit39331f834db694be103a7ecb1aac3ba2cc5279fc (patch)
treee8862a070c8946b37a907d901f4812191f3ec2d3 /lib/iter
parentf4a939a2cfdc00643b02c404b0acbed382964dd0 (diff)
downloadmc-39331f834db694be103a7ecb1aac3ba2cc5279fc.tar.gz
Clean up some more dead code.
Diffstat (limited to 'lib/iter')
-rw-r--r--lib/iter/test/reverse.myr5
-rw-r--r--lib/iter/test/zip.myr6
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/iter/test/reverse.myr b/lib/iter/test/reverse.myr
index ed4ce1c..2727d98 100644
--- a/lib/iter/test/reverse.myr
+++ b/lib/iter/test/reverse.myr
@@ -2,11 +2,10 @@ use std
use iter
const main = {
- var n, l : int[:]
+ var n
n = 0
- l = [3, 2, 1, 0][:]
- for x : iter.byreverse(l)
+ for x : iter.byreverse([3, 2, 1, 0][:])
std.assert(x == n, "invalid reversed value {}, expected {}", x, n)
n++
;;
diff --git a/lib/iter/test/zip.myr b/lib/iter/test/zip.myr
index 57f0563..2ef89b7 100644
--- a/lib/iter/test/zip.myr
+++ b/lib/iter/test/zip.myr
@@ -2,12 +2,10 @@ use std
use iter
const main = {
- var n, la : int[:], lb : int[:]
+ var n
n = 0
- la = [0,2,4,6,8][:]
- lb = [2,4][:]
- for (a, b) : iter.byzip(la, lb)
+ for (a, b) : iter.byzip([0,2,4,6,8][:], [2,4][:])
std.assert(a == n*2, "invalid val from a: {}", a)
std.assert(b == n*2 + 2, "invalid val from b: {}", b)
n++