From 1043bad18b114590c78d1db804339a457fd37d96 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 18 Jan 2016 06:49:18 -0800 Subject: 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. --- lib.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib.c') diff --git a/lib.c b/lib.c index e6aa748e..817f9449 100644 --- a/lib.c +++ b/lib.c @@ -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; -- cgit v1.2.3