Builtin function argument parsing
This commit is contained in:
@ -18,8 +18,9 @@ intptr_t list_length(LispVal *list) {
|
||||
|
||||
bool list_length_eq(LispVal *list, intptr_t size) {
|
||||
assert(LISTP(list));
|
||||
while (size-- && CONSP(list)) {
|
||||
while (size && CONSP(list)) {
|
||||
list = XCDR(list);
|
||||
--size;
|
||||
}
|
||||
return size == 0 && NILP(list);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user