aboutsummaryrefslogtreecommitdiff
path: root/examples/std.ct
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-08-14 20:44:26 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-08-14 20:44:26 +0300
commit2023a7b2d9656f80b00de81453348c0a66f200f7 (patch)
tree06e4ea293318955cc4cf620428d04f1708c17364 /examples/std.ct
parent1a56a881bc2c37614cfd074e7b986211c6d04809 (diff)
downloadek-2023a7b2d9656f80b00de81453348c0a66f200f7.tar.gz
ek-2023a7b2d9656f80b00de81453348c0a66f200f7.zip
test cleanup
+ Somewhat poor Git hygiene but I also fixed some bugs while I was at it.
Diffstat (limited to 'examples/std.ct')
-rw-r--r--examples/std.ct35
1 files changed, 0 insertions, 35 deletions
diff --git a/examples/std.ct b/examples/std.ct
deleted file mode 100644
index 339459f..0000000
--- a/examples/std.ct
+++ /dev/null
@@ -1,35 +0,0 @@
-type std {
- init(mut * any);
- deinit(mut * any);
- copy(mut * any, * any);
- move(mut * any, mut * any);
-}
-
-/* these as well could be way optimized for builtin types */
-type comparable {
- equal(* any, * any) bool;
- less_than(* any, * any) bool;
-}
-
-/* I'm imagining that if someone provides a specific function for these, it will
- * be used rather than these ones, but that the minimum to implement comparable
- * is as small as possible this should be fine */
-pub not_equal(a * comparable, b * comparable) bool
-{
- return !equal(a, b);
-}
-
-pub greater_than(a * comparable. b * comparable) bool
-{
- return !equal(a, b) && !less_than(a, b);
-}
-
-pub less_or_equal(a * comparable, b * comparable) bool
-{
- return !greater_than(a, b);
-}
-
-pub greater_or_equal(a * comparable, b * comparable) bool
-{
- return !less_than(a, b);
-}