summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul A. Patience <paul@apatience.com>2022-02-07 09:31:30 +0000
committerKaz Kylheku <kaz@kylheku.com>2022-02-07 09:38:06 -0800
commite6c34ced9ff9abade85c0160a26f43513a13d631 (patch)
treec4c664f66de53e9bac942e34ff27e61af684d199
parent76c9b4092e6b90c64273b567b8c42aee762c8615 (diff)
downloadtxr-e6c34ced9ff9abade85c0160a26f43513a13d631.tar.gz
txr-e6c34ced9ff9abade85c0160a26f43513a13d631.tar.bz2
txr-e6c34ced9ff9abade85c0160a26f43513a13d631.zip
lib: fix return value of separate for nil seq.
* lib.c (separate): Return (list nil nil) instead of just nil when the sequence parameter is nil, as is documented.
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 2f3f6603..51092c36 100644
--- a/lib.c
+++ b/lib.c
@@ -3153,7 +3153,7 @@ val separate(val pred, val seq_in, val keyfun_in)
switch (type(seq_in)) {
case NIL:
- return nil;
+ return cons(nil, cons(nil, nil));
case CONS:
case LCONS:
case COBJ: