summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-07-02 06:21:35 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-07-02 06:21:35 -0700
commit6c9d1315ca6da5f3b5d365d952259480be5b7e58 (patch)
treef4d43ca5d3f8be5d6d2b67768be89c6005bd9dfd /txr.1
parentf3101cf296dfa0c7f97fd573ded8409905ae9ca1 (diff)
downloadtxr-6c9d1315ca6da5f3b5d365d952259480be5b7e58.tar.gz
txr-6c9d1315ca6da5f3b5d365d952259480be5b7e58.tar.bz2
txr-6c9d1315ca6da5f3b5d365d952259480be5b7e58.zip
New function: iterable.
* eval.c (eval_init): Register iterable intrinsic. * lib.c (seq_iterable): New static function. (nullify): Use seq_iterable to simplify function. (iterable): New function. * lib.h (iterable): Declared. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.124
1 files changed, 24 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 05c96ae7..e0bbd032 100644
--- a/txr.1
+++ b/txr.1
@@ -29342,6 +29342,30 @@ methods are considered sequences.
No other objects are sequences. However, future revisions of
the language may specify additional objects that are sequences.
+.coNP Function @ iterable
+.synb
+.mets (iterable << object )
+.syne
+.desc
+The
+.code iterable
+function returns
+.code t
+if
+.meta object
+is iterable, otherwise
+.conp nil .
+
+If
+.meta object
+is a sequence according to the
+.code seqp
+function, then it is iterable.
+
+Additional objects that are not sequences are also iterable:
+numeric or character ranges, and numbers. Future revisions
+of the language may specify additional iterable objects.
+
.coNP Function @ make-like
.synb
.mets (make-like < list << object )