diff options
-rw-r--r-- | eval.c | 7 | ||||
-rw-r--r-- | lib.c | 7 | ||||
-rw-r--r-- | lib.h | 1 |
3 files changed, 7 insertions, 8 deletions
@@ -1138,6 +1138,13 @@ static val applyv(val fun, struct args *args) return apply_intrinsic(fun, args_get_list(args)); } +static loc term(loc head) +{ + while (consp(deref(head))) + head = cdr_l(deref(head)); + return head; +} + static val iapply(val fun, struct args *args) { cnum index = 0; @@ -660,13 +660,6 @@ loc tail(val cons) return cdr_l(cons); } -loc term(loc head) -{ - while (consp(deref(head))) - head = cdr_l(deref(head)); - return head; -} - val lastcons(val list) { val ret; @@ -535,7 +535,6 @@ val conses(val list); val lazy_conses(val list); val listref(val list, val ind); loc tail(val cons); -loc term(loc head); val lastcons(val list); val last(val list, val n); val nthlast(val pos, val list); |