aboutsummaryrefslogtreecommitdiff
path: root/src/bamboo.c
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-06-17 09:12:35 +0800
committerMistivia <i@mistivia.com>2025-06-17 09:12:35 +0800
commit6f1cfbda4a519ad8a232d126539a2732ab43c671 (patch)
treefe33602e4dd8419b216ca755ea91c63c72ffa65b /src/bamboo.c
init
Diffstat (limited to 'src/bamboo.c')
-rw-r--r--src/bamboo.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/bamboo.c b/src/bamboo.c
new file mode 100644
index 0000000..70a84f5
--- /dev/null
+++ b/src/bamboo.c
@@ -0,0 +1,22 @@
+#include "bamboo.h"
+
+SExpRef new_list1(Bamboo *ctx, SExpRef e1) {
+ return cons(ctx, e1, nil(ctx));
+}
+
+SExpRef new_list2(Bamboo *ctx, SExpRef e1, SExpRef e2) {
+ return cons(ctx, e1, new_list1(ctx, e2));
+}
+
+SExpRef new_list3(Bamboo *ctx, SExpRef e1, SExpRef e2, SExpRef e3) {
+ return cons(ctx, e1, new_list2(ctx, e2, e3));
+}
+
+SExpRef new_list4(Bamboo *ctx, SExpRef e1, SExpRef e2, SExpRef e3, SExpRef e4) {
+ return cons(ctx, e1, new_list3(ctx, e2, e3, e4));
+}
+
+SExpRef new_list5(Bamboo *ctx, SExpRef e1, SExpRef e2, SExpRef e3, SExpRef e4, SExpRef e5) {
+ return cons(ctx, e1, new_list4(ctx, e2, e3, e4, e5));
+}
+