summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 932fecde..29e661d2 100644
--- a/lib.c
+++ b/lib.c
@@ -354,6 +354,18 @@ val nappend2(val list1, val list2)
return list1;
}
+val ldiff(val list1, val list2)
+{
+ list_collect_decl (out, tail);
+
+ while (list1 && list1 != list2) {
+ list_collect (tail, car(list1));
+ list1 = cdr(list1);
+ }
+
+ return out;
+}
+
static val flatten_helper(val env, val item)
{
return flatten(item);