From b6a5d3a37c7e38d43d30a14ab64a76596007d190 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 17 Jan 2016 09:38:38 -0800 Subject: Apply partition/split bugfix to partition*. * lib.c (partition_star): The same issues that were addressed in TXR 126 in 2015-11-29 commits and 2015-11-24 commits must also be addressed here. --- lib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib.c') diff --git a/lib.c b/lib.c index 34ecbb77..db10a056 100644 --- a/lib.c +++ b/lib.c @@ -2012,16 +2012,16 @@ val partition_star(val seq, val indices) if (!seq) return nil; - if (!indices) - return cons(seq, nil); - if (functionp(indices)) indices = funcall1(indices, seq); + if (!indices) + return cons(seq, nil); + if (indices == zero) return nullify(rest(seq)); - if (atom(indices)) { + if (!seqp(indices)) { indices = cons(indices, nil); } else { while (eql(car(indices), base)) { -- cgit v1.2.3