about summary refs log tree commit diff
path: root/usth/ICT2.1/labwork/2/construct.h
diff options
context:
space:
mode:
Diffstat (limited to 'usth/ICT2.1/labwork/2/construct.h')
-rw-r--r--usth/ICT2.1/labwork/2/construct.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/usth/ICT2.1/labwork/2/construct.h b/usth/ICT2.1/labwork/2/construct.h
new file mode 100644
index 0000000..2d1c840
--- /dev/null
+++ b/usth/ICT2.1/labwork/2/construct.h
@@ -0,0 +1,17 @@
+/*
+ * Lisp construct header.
+ * This is free and unencumbered software released into the public domain.
+ */
+
+typedef struct list construct;
+struct list {
+	void *car;
+        construct *cdr;
+};
+
+construct *cons(void *, construct *);
+void *car(construct *);
+construct *cdr(construct *);
+size_t length(construct *);
+void *nth(construct *, size_t);
+construct *insert(void *, construct *, size_t);