www.delorie.com/gnu/docs/guile/guile_443.html   search  
Buy GNU books!

Guile Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

39.3.2 Predicates

The procedures in this section test specific properties of lists.

Scheme Procedure: proper-list? obj
Return #t if obj is a proper list, that is a finite list, terminated with the empty list. Otherwise, return #f.

Scheme Procedure: circular-list? obj
Return #t if obj is a circular list, otherwise return #f.

Scheme Procedure: dotted-list? obj
Return #t if obj is a dotted list, return #f otherwise. A dotted list is a finite list which is not terminated by the empty list, but some other value.

Scheme Procedure: null-list? lst
Return #t if lst is the empty list (), #f otherwise. If something else than a proper or circular list is passed as lst, an error is signalled. This procedure is recommended for checking for the end of a list in contexts where dotted lists are not allowed.

Scheme Procedure: not-pair? obj
Return #t is obj is not a pair, #f otherwise. This is shorthand notation (not (pair? obj)) and is supposed to be used for end-of-list checking in contexts where dotted lists are allowed.

Scheme Procedure: list= elt= list1 ...
Return #t if all argument lists are equal, #f otherwise. List equality is determined by testing whether all lists have the same length and the corresponding elements are equal in the sense of the equality predicate elt=. If no or only one list is given, #t is returned.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003