Node:Equality predicates, Next:, Previous:Type predicates, Up:GH



19.10 Equality predicates

These C functions mirror Scheme's equality predicate procedures with one important difference. The C routines return C boolean values (0 and 1) instead of SCM_BOOL_T and SCM_BOOL_F.

The Scheme notational convention of putting a ? at the end of predicate procedure names is mirrored in C by placing _p at the end of the procedure. For example, (equal? ...) maps to gh_equal_p(...).

int gh_eq_p (SCM x, SCM y) Function
Returns 1 if x and y are equal in the sense of Scheme's eq? predicate, 0 otherwise.

int gh_eqv_p (SCM x, SCM y) Function
Returns 1 if x and y are equal in the sense of Scheme's eqv? predicate, 0 otherwise.

int gh_equal_p (SCM x, SCM y) Function
Returns 1 if x and y are equal in the sense of Scheme's equal? predicate, 0 otherwise.

int gh_string_equal_p (SCM s1, SCM s2) Function
Returns 1 if the strings s1 and s2 are equal, 0 otherwise.

int gh_null_p (SCM l) Function
Returns 1 if l is an empty list or pair; 0 otherwise.