summaryrefslogtreecommitdiffstats
path: root/bytecode/slice.c
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2023-02-12 15:37:25 -0800
committerRose Hogenson <rhogenson@posteo.net>2023-02-12 15:37:25 -0800
commitd940187fd8720e0ab3c00e5a6a7ae8f181c7752d (patch)
tree69df829ae1e7fb9454008920b49db08489d939a6 /bytecode/slice.c
parent5989629a7951e544ad4656672025a99ecd08c7c9 (diff)
downloadsml-d940187fd8720e0ab3c00e5a6a7ae8f181c7752d.tar.zst
Add lambda functions.
Diffstat (limited to 'bytecode/slice.c')
-rw-r--r--bytecode/slice.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/bytecode/slice.c b/bytecode/slice.c
deleted file mode 100644
index 0739a4a..0000000
--- a/bytecode/slice.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <assert.h>
-
-#include "slice.h"
-
-struct slice slice(struct slice a, size_t i, size_t j)
-{
- assert(i <= a.size && j <= a.size && i <= j);
- return (struct slice) { .size = j - i, .buf = a.buf + i };
-}
-
-struct slice slice1(struct slice a, size_t i)
-{
- return slice(a, i, a.size);
-}
-
-struct val_slice val_slice(struct val_slice a, size_t i, size_t j)
-{
- assert(i <= a.size && j <= a.size && i <= j);
- return (struct val_slice) { .size = j - i, .buf = a.buf + i };
-}
-
-struct val_slice val_slice1(struct val_slice a, size_t i)
-{
- return val_slice(a, i, a.size);
-}