This commit is contained in:
Jan Nieuwenhuizen 2019-10-30 14:18:19 +01:00
parent e448654721
commit 5e33bb4cdc
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ SCM
car_ (SCM x)
{
SCM a = CAR (x);
if (TYPE (a) == TPAIR)
if (TYPE (x) == TPAIR)
return a;
return make_number (a);
}
@ -48,7 +48,7 @@ SCM
cdr_ (SCM x)
{
SCM d = CDR (x);
if (TYPE (d) == TPAIR)
if (TYPE (x) == TPAIR || TYPE (x) == TCLOSURE)
return d;
return make_number (d);
}
@ -125,8 +125,8 @@ equal2:
long i;
for (i = 0; i < LENGTH (a); i = i + 1)
{
SCM ai = VECTOR (a) + i;
SCM bi = VECTOR (b) + i;
SCM ai = cell_ref (VECTOR (a), i);
SCM bi = cell_ref (VECTOR (b), i);
if (TYPE (ai) == TREF)
ai = REF (ai);
if (TYPE (bi) == TREF)