summaryrefslogtreecommitdiff
path: root/appl/lib/sh9util.b
diff options
context:
space:
mode:
authorKonstantin Kirik (snegovick) <snegovick@uprojects.org>2025-12-12 06:24:08 +0300
committerKonstantin Kirik (snegovick) <snegovick@uprojects.org>2025-12-12 06:24:08 +0300
commit06c7845f0247e77ed861b85b6c48556f6b6b120d (patch)
tree6e9eac0970f97bdae439925772f51f232af5e30f /appl/lib/sh9util.b
parenta40ef1434889babbd88c9d0c5913c70e96ac2774 (diff)
Reorganize files according to proper directory structure
Diffstat (limited to 'appl/lib/sh9util.b')
-rw-r--r--appl/lib/sh9util.b26
1 files changed, 26 insertions, 0 deletions
diff --git a/appl/lib/sh9util.b b/appl/lib/sh9util.b
new file mode 100644
index 0000000..7452a13
--- /dev/null
+++ b/appl/lib/sh9util.b
@@ -0,0 +1,26 @@
+implement Sh9Util;
+
+include "sh9util.m";
+
+reverse_list[T](toks: list of T): list of T
+{
+ lt := len toks;
+ out : list of T;
+ for (i := 0; i < lt; i ++) {
+ tok := hd toks;
+ toks = tl toks;
+ out = tok :: out;
+ }
+ return out;
+}
+
+to_array[T](toks: list of T): array of T {
+ lt := len toks;
+ out := array[lt] of T;
+ for (i := 0; i < lt; i ++) {
+ tok := hd toks;
+ toks = tl toks;
+ out[i] = tok;
+ }
+ return out;
+}