core: xassq: Prepare for M2-Planet.

* src/lib.c (xassq): Prepare for M2-Planet.
This commit is contained in:
Jan Nieuwenhuizen 2019-10-24 21:20:17 +02:00
parent d5521e333a
commit 1cb7e13d42
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 6 additions and 4 deletions

View File

@ -112,10 +112,12 @@ stack_ref (SCM stack, SCM index)
SCM SCM
xassq (SCM x, SCM a) /* For speed in core. */ xassq (SCM x, SCM a) /* For speed in core. */
{ {
while (a != cell_nil && x != CDAR (a)) while (a != cell_nil)
a = CDR (a); {
if (a != cell_nil) if (x == CDAR (a))
return CAR (a); return CAR (a);
a = CDR (a);
}
return cell_f; return cell_f;
} }