refactor list_by_array
This commit is contained in:
parent
b66021c042
commit
9b31e5bd2f
|
@ -83,13 +83,12 @@ pic_value
|
|||
pic_list_by_array(pic_state *pic, size_t c, pic_value *vs)
|
||||
{
|
||||
pic_value v;
|
||||
size_t i;
|
||||
|
||||
v = pic_nil_value();
|
||||
for (i = 0; i < c; ++i) {
|
||||
v = pic_cons(pic, vs[i], v);
|
||||
while (c--) {
|
||||
v = pic_cons(pic, vs[c], v);
|
||||
}
|
||||
return pic_reverse(pic, v);
|
||||
return v;
|
||||
}
|
||||
|
||||
pic_value
|
||||
|
|
Loading…
Reference in New Issue