commit
e7946902c1
|
@ -645,6 +645,9 @@ pic_pair_map(pic_state *pic)
|
|||
|
||||
pic_get_args(pic, "l*", &proc, &argc, &args);
|
||||
|
||||
if (argc == 0)
|
||||
pic_errorf(pic, "map: wrong number of arguments (1 for at least 2)");
|
||||
|
||||
ret = pic_nil_value();
|
||||
do {
|
||||
arg = pic_nil_value();
|
||||
|
@ -655,6 +658,7 @@ pic_pair_map(pic_state *pic)
|
|||
pic_push(pic, pic_car(pic, args[i]), arg);
|
||||
args[i] = pic_cdr(pic, args[i]);
|
||||
}
|
||||
|
||||
if (i != argc) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
(import (scheme base)
|
||||
(picrin test))
|
||||
|
||||
(map +)
|
Loading…
Reference in New Issue