summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 1ca1790c..6576049c 100644
--- a/lib.c
+++ b/lib.c
@@ -2758,6 +2758,16 @@ val listp(val obj)
return if2(obj == nil || consp(obj), t);
}
+val endp(val obj)
+{
+ if (obj == nil)
+ return t;
+ if (consp(obj))
+ return nil;
+ uw_throwf(error_s, lit("endp: list improperly terminated by ~s"),
+ obj, nao);
+}
+
val proper_list_p(val obj)
{
while (consp(obj))