diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-06-28 08:48:20 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-06-28 08:48:20 -0700 |
commit | dbcfe10c3a9dc881e1f157582c01074fc60623f4 (patch) | |
tree | 20ea4d2c453e68104c625b67d63f24d79ca01610 /txr.1 | |
parent | 0197d1dc1c43b808bfbe641ef702b10128fbdc9d (diff) | |
download | txr-dbcfe10c3a9dc881e1f157582c01074fc60623f4.tar.gz txr-dbcfe10c3a9dc881e1f157582c01074fc60623f4.tar.bz2 txr-dbcfe10c3a9dc881e1f157582c01074fc60623f4.zip |
New functions: list-seq, ved-seq and str-seq.
These functions convert any iterable to a list, vector or
string.
* eval.c (eval_init): Registered list-seq, vec-seq and str-seq
intrinsics.
* lib.c (list_seq, vec_seq, str_seq): New functions.
* lib.h (list_seq, vec_seq, str_seq): Declared.
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -29227,6 +29227,35 @@ then convert the resulting list to the same type as an input value by using .codn make-like . +.coNP Functions @, list-seq @ vec-seq and @ str-seq +.synb +.mets (list-seq << iterable ) +.mets (vec-seq << iterable ) +.mets (str-seq << iterable ) +.syne +.desc +The +.codn list-seq , +.code vec-seq +and +.code str-seq +functions convert an iterable object of any type into a list, vector +or string, respectively. + +The +.code list-seq +and +.code vec-seq +iterate the items of +.meta iterable +and accumulate these items into a new list or vector. + +The +.code str-seq +similarly iterates the items of +.metn iterable , +requiring them to be a mixture of characters and strings. + .coNP Functions @ length and @ len .synb .mets (length << iterable ) |