minor code tweak

avoid a type-tag test in `list-tail'
This commit is contained in:
Matthew Flatt 2012-05-06 17:53:53 -06:00
parent 55814fe7fc
commit dce87cceb4

View File

@ -1304,7 +1304,7 @@ do_list_ref(char *name, int takecar, int argc, Scheme_Object *argv[])
lst = argv[0];
index = argv[1];
if (!SCHEME_PAIRP(lst) && takecar) {
if (takecar && !SCHEME_PAIRP(lst)) {
scheme_wrong_type(name, "pair", 0, argc, argv);;
}