DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(guile.info.gz) List Selection

Info Catalog (guile.info.gz) List Constructors (guile.info.gz) Lists (guile.info.gz) Append/Reverse
 
 22.2.4 List Selection
 ---------------------
 
 These procedures are used to get some information about a list, or to
 retrieve one or more elements of a list.
 
  -- Scheme Procedure: length lst
  -- C Function: scm_length (lst)
      Return the number of elements in list LST.
 
  -- Scheme Procedure: last-pair lst
  -- C Function: scm_last_pair (lst)
      Return a pointer to the last pair in LST, signalling an error if
      LST is circular.
 
  -- Scheme Procedure: list-ref list k
  -- C Function: scm_list_ref (list, k)
      Return the Kth element from LIST.
 
  -- Scheme Procedure: list-tail lst k
  -- Scheme Procedure: list-cdr-ref lst k
  -- C Function: scm_list_tail (lst, k)
      Return the "tail" of LST beginning with its Kth element.  The
      first element of the list is considered to be element 0.
 
      `list-tail' and `list-cdr-ref' are identical.  It may help to
      think of `list-cdr-ref' as accessing the Kth cdr of the list, or
      returning the results of cdring K times down LST.
 
  -- Scheme Procedure: list-head lst k
  -- C Function: scm_list_head (lst, k)
      Copy the first K elements from LST into a new list, and return it.
 
Info Catalog (guile.info.gz) List Constructors (guile.info.gz) Lists (guile.info.gz) Append/Reverse
automatically generated byinfo2html