The "reverse" builtin should use TST_LIST, not TST_PAIR; otherwise, it fails on the (permitted) case of (reverse '()).
It seems reasonable to allow reverse to operate on an empty list. Neither the R5RS nor R6RS say it isn't allowed, only that reverse takes a list argument. While the suggested change does fix the problem, the reverse function should also be changed to verify that the passed parameter is a valid list.
Bumping priority so it stands out from the other bugs as it should be fixed for next release.
This should be fixed for the next release.
R5RS does indeed state that reverse takes a list. FIx commited as revision 64 in SVN.
Log in to post a comment.