DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(guile.info.gz) List Searching

Info Catalog (guile.info.gz) List Modification (guile.info.gz) Lists (guile.info.gz) List Mapping
 
 22.2.7 List Searching
 ---------------------
 
 The following procedures search lists for particular elements.  They use
 different comparison predicates for comparing list elements with the
 object to be searched.  When they fail, they return `#f', otherwise
 they return the sublist whose car is equal to the search object, where
 equality depends on the equality predicate used.
 
  -- Scheme Procedure: memq x lst
  -- C Function: scm_memq (x, lst)
      Return the first sublist of LST whose car is `eq?' to X where the
      sublists of LST are the non-empty lists returned by `(list-tail
      LST K)' for K less than the length of LST.  If X does not occur in
      LST, then `#f' (not the empty list) is returned.
 
  -- Scheme Procedure: memv x lst
  -- C Function: scm_memv (x, lst)
      Return the first sublist of LST whose car is `eqv?' to X where the
      sublists of LST are the non-empty lists returned by `(list-tail
      LST K)' for K less than the length of LST.  If X does not occur in
      LST, then `#f' (not the empty list) is returned.
 
  -- Scheme Procedure: member x lst
  -- C Function: scm_member (x, lst)
      Return the first sublist of LST whose car is `equal?' to X where
      the sublists of LST are the non-empty lists returned by
      `(list-tail LST K)' for K less than the length of LST.  If X does
      not occur in LST, then `#f' (not the empty list) is returned.
 
Info Catalog (guile.info.gz) List Modification (guile.info.gz) Lists (guile.info.gz) List Mapping
automatically generated byinfo2html