Fix some bugs
This commit is contained in:
+14
@@ -53,6 +53,20 @@ DEFUN(cdr, "cdr", (LispVal * list), "(list)", "") {
|
||||
return NILP(list) ? Qnil : XCDR(list);
|
||||
}
|
||||
|
||||
DEFUN(rplaca, "rplaca", (LispVal * cons, LispVal *newcar), "(cons newcar)",
|
||||
"") {
|
||||
CHECK_TYPE(cons, TYPE_CONS);
|
||||
RPLACA(cons, newcar);
|
||||
return newcar;
|
||||
}
|
||||
|
||||
DEFUN(rplacd, "rplacd", (LispVal * cons, LispVal *newcdr), "(cons newcdr)",
|
||||
"") {
|
||||
CHECK_TYPE(cons, TYPE_CONS);
|
||||
RPLACD(cons, newcdr);
|
||||
return newcdr;
|
||||
}
|
||||
|
||||
DEFUN(length_eq, "length=", (LispVal * list, LispVal *length), "(list length)",
|
||||
"Return non-nil if LIST's length is LENGTH.") {
|
||||
CHECK_LISTP(list);
|
||||
|
||||
Reference in New Issue
Block a user