summaryrefslogtreecommitdiff
path: root/lib/std/sleq.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/sleq.myr')
-rw-r--r--lib/std/sleq.myr18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/std/sleq.myr b/lib/std/sleq.myr
new file mode 100644
index 0000000..cfc60b4
--- /dev/null
+++ b/lib/std/sleq.myr
@@ -0,0 +1,18 @@
+pkg std =
+ generic sleq : (a : @a[:], b : @a[:] -> bool)
+;;
+
+generic sleq = {a, b
+ var i
+
+ if a.len != b.len
+ -> false
+ ;;
+
+ for i = 0; i < a.len; i++
+ if a[i] != b[i]
+ -> false
+ ;;
+ ;;
+ -> true
+}