summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-07-06 22:34:23 -0700
committerOri Bernstein <ori@eigenstate.org>2018-07-06 22:34:23 -0700
commit5d16f2c900fc1bc0b461878f5c936b969b7bee7d (patch)
tree419a989d04c9f355a52e6d6ce4780ca4ded48f6e
parent3706df6d6726eb94ac301e4a8eae5d6dc3393df4 (diff)
downloadmc-5d16f2c900fc1bc0b461878f5c936b969b7bee7d.tar.gz
Use `eq()` function in generic equatable slices.
-rw-r--r--lib/std/sleq.myr3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/std/sleq.myr b/lib/std/sleq.myr
index 1e8d433..c91f826 100644
--- a/lib/std/sleq.myr
+++ b/lib/std/sleq.myr
@@ -17,6 +17,7 @@ pkg std =
impl equatable uint[:]
impl equatable uint32[:]
impl equatable uint64[:]
+
generic sleq : (a : @a[:], b : @a[:] -> bool)
;;
@@ -32,7 +33,7 @@ impl equatable @a[:] =
;;
/* can't use memeq because of padding */
for var i = 0; i < a.len; i++
- if a[i] != b[i]
+ if !eq(a[i], b[i])
-> false
;;
;;