summaryrefslogtreecommitdiff
path: root/examples/list_null.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/list_null.c')
-rw-r--r--examples/list_null.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/examples/list_null.c b/examples/list_null.c
deleted file mode 100644
index 85a3d2c..0000000
--- a/examples/list_null.c
+++ /dev/null
@@ -1,27 +0,0 @@
-typedef struct list_t {
- void *content;
- struct list_t *next;
-} list_t;
-
-void *list(void *head, void *tail) {
- list_t *ret = gc_alloc(sizeof (*ret));
- ret->content = head;
- ret->next = (list_t *) tail;
- return ret;
-}
-
-void *nil() {
- return (void *) 0;
-}
-
-void *head(void *list) {
- return list->head;
-}
-
-void *tail(void *list) {
- return list->tail;
-}
-
-void *has_tail(void *list) {
- return list->tail;
-}