* src/mes.c (reverse_x_): Handle empty list.
* tests/scm.test ("reverse! ()"): Test it.
SCM
reverse_x_ (SCM x, SCM t)
{
- if (TYPE (x) != TPAIR)
+ if (x != cell_nil && TYPE (x) != TPAIR)
error (cell_symbol_not_a_pair, cons (x, cell_reverse_x_));
SCM r = t;
while (x != cell_nil)
(reverse! list)
list))
+(pass-if-equal "reverse! ()" '()
+ (reverse! '()))
+
(pass-if "cond-expand" (sequal? (cond-expand (foobar #f) (mes (display ": pass: *YAY*") 'mes) (guile (display ": pass: *GUILE*") 'mes)) 'mes))
(pass-if "apply identity" (seq? (apply identity '(0)) 0))