summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-06-25 06:51:17 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-06-25 06:51:17 -0700
commit640a272f369406e7e433354959f4e8e53f68088f (patch)
tree31b52c1dcad424be956262741acdef3304eb59eb /lib.c
parent3ef45acb19c1df4f58b5fb2f2b289f6b8a923fd6 (diff)
downloadtxr-640a272f369406e7e433354959f4e8e53f68088f.tar.gz
txr-640a272f369406e7e433354959f4e8e53f68088f.tar.bz2
txr-640a272f369406e7e433354959f4e8e53f68088f.zip
seqp: expand definition of sequences.
* lib.c (seqp): Use seq_info to classify the object as a sequence. * txr.1: Update description of seqp.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c14
1 files changed, 2 insertions, 12 deletions
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)