From 640a272f369406e7e433354959f4e8e53f68088f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 25 Jun 2019 06:51:17 -0700 Subject: seqp: expand definition of sequences. * lib.c (seqp): Use seq_info to classify the object as a sequence. * txr.1: Update description of seqp. --- lib.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'lib.c') diff --git a/lib.c b/lib.c index 746f0e72..95e7573c 100644 --- a/lib.c +++ b/lib.c @@ -1021,18 +1021,8 @@ val nullify(val seq) val seqp(val obj) { - switch (type(obj)) { - case NIL: - case CONS: - case LCONS: - case VEC: - case STR: - case LSTR: - case LIT: - return t; - default: - return nil; - } + seq_info_t si = seq_info(obj); + return tnil(si.kind != SEQ_NOTSEQ); } loc list_collect(loc ptail, val obj) -- cgit v1.2.3