summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index bb0d580f..e84b098f 100644
--- a/lib.c
+++ b/lib.c
@@ -408,6 +408,13 @@ loc tail(val cons)
return cdr_l(cons);
}
+loc term(loc head)
+{
+ while (consp(deref(head)))
+ head = cdr_l(deref(head));
+ return head;
+}
+
loc lastcons(val list)
{
loc ret = nulloc;