diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-01-18 06:49:18 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-01-18 06:49:18 -0800 |
commit | 1043bad18b114590c78d1db804339a457fd37d96 (patch) | |
tree | c9ba41b193b049af975bce1774f6ac6bd2da9d5f /lib.c | |
parent | 166927780f449e7b0c77345cad3150684d42d150 (diff) | |
download | txr-1043bad18b114590c78d1db804339a457fd37d96.tar.gz txr-1043bad18b114590c78d1db804339a457fd37d96.tar.bz2 txr-1043bad18b114590c78d1db804339a457fd37d96.zip |
Relax input type constraint in vec-list.
* lib.c (vec_list): Don't require input to be specifically a
list, just any sequence that can be marched with cdr until
nil. This commit also fixes the problem that the error message
was still referring to the function as vector-list.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -5965,10 +5965,7 @@ val vec_list(val list) { val vec = vector(zero, nil); - if (!listp(list)) - uw_throwf(error_s, lit("vector-list: list expected, not ~s"), list, nao); - - for (; consp(list); list = cdr(list)) + for (; list; list = cdr(list)) vec_push(vec, car(list)); return vec; |