guile-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile/guile-core/doc ChangeLog scheme-data.texi...


From: Martin Grabmueller
Subject: guile/guile-core/doc ChangeLog scheme-data.texi...
Date: Mon, 18 Jun 2001 12:08:31 -0700

CVSROOT:        /cvs
Module name:    guile
Changes by:     Martin Grabmueller <address@hidden>     01/06/18 12:08:31

Modified files:
        guile-core/doc : ChangeLog scheme-data.texi scheme-modules.texi 
                         srfi-modules.texi 

Log message:
        2001-06-18  Martin Grabmueller  <address@hidden>
        
        * srfi-modules.texi (SRFI-1): Completed procedure documentation.
        
        * scheme-data.texi (List Constructors): Added make-list.
        Added type index entries for all data types.
        
        2001-06-15  Martin Grabmueller  <address@hidden>
        
        * srfi-modules.texi (SRFI-1): New section documenting the SRFI-1
        module.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/doc/ChangeLog.diff?cvsroot=OldCVS&tr1=1.96&tr2=1.97&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/doc/scheme-data.texi.diff?cvsroot=OldCVS&tr1=1.22&tr2=1.23&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/doc/scheme-modules.texi.diff?cvsroot=OldCVS&tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/doc/srfi-modules.texi.diff?cvsroot=OldCVS&tr1=1.6&tr2=1.7&r1=text&r2=text

Patches:
Index: guile/guile-core/doc/ChangeLog
diff -u guile/guile-core/doc/ChangeLog:1.96 guile/guile-core/doc/ChangeLog:1.97
--- guile/guile-core/doc/ChangeLog:1.96 Sat Jun 16 13:16:25 2001
+++ guile/guile-core/doc/ChangeLog      Mon Jun 18 12:08:31 2001
@@ -1,3 +1,20 @@
+2001-06-18  Martin Grabmueller  <address@hidden>
+
+       * srfi-modules.texi (SRFI-1): Completed procedure documentation.
+
+       * scheme-data.texi (List Constructors): Added make-list.
+       Added type index entries for all data types.
+
+2001-06-15  Martin Grabmueller  <address@hidden>
+
+       * srfi-modules.texi (SRFI-1): New section documenting the SRFI-1
+       module.
+
+2001-06-14  Martin Grabmueller  <address@hidden>
+
+       * scheme-modules.texi (Included Guile Modules): Added reference to
+       (srfi srfi-1) module.
+
 2001-06-16  Marius Vollmer  <address@hidden>
 
        * posix.texi (Conventions): Use `system-error-errno' instead of
Index: guile/guile-core/doc/scheme-data.texi
diff -u guile/guile-core/doc/scheme-data.texi:1.22 
guile/guile-core/doc/scheme-data.texi:1.23
--- guile/guile-core/doc/scheme-data.texi:1.22  Wed May 30 13:54:17 2001
+++ guile/guile-core/doc/scheme-data.texi       Mon Jun 18 12:08:31 2001
@@ -63,6 +63,7 @@
 
 @node Booleans
 @section Booleans
address@hidden Booleans
 
 The two boolean values are @code{#t} for true and @code{#f} for false.
 
@@ -137,6 +138,7 @@
 
 @node Numbers
 @section Numerical data types
address@hidden Numbers
 
 Guile supports a rich ``tower'' of numerical types --- integer,
 rational, real and complex --- and provides an extensive set of
@@ -227,9 +229,11 @@
 The next few subsections document each of Guile's numerical data types
 in detail.
 
-
 @node Integers
 @subsection Integers
+
address@hidden Integer numbers
+
 @rnindex integer?
 
 Integers are whole numbers, that is numbers with no fractional part,
@@ -288,6 +292,9 @@
 
 @node Reals and Rationals
 @subsection Real and Rational Numbers
address@hidden Real numbers
address@hidden Rational numbers
+
 @rnindex real?
 @rnindex rational?
 
@@ -350,6 +357,8 @@
 
 @node Complex Numbers
 @subsection Complex Numbers
address@hidden Complex numbers
+
 @rnindex complex?
 
 Complex numbers are the set of numbers that describe all possible points
@@ -386,6 +395,9 @@
 
 @node Exactness
 @subsection Exact and Inexact Numbers
address@hidden Exact numbers
address@hidden Inexact numbers
+
 @rnindex exact?
 @rnindex inexact?
 @rnindex exact->inexact
@@ -1150,7 +1162,7 @@
 
 @node Characters
 @section Characters
-
address@hidden Characters
 
 Most of the characters in the ASCII character set may be referred to by
 name: for example, @code{#\tab}, @code{#\esc}, @code{#\stx}, and so on.
@@ -1338,6 +1350,7 @@
 
 @node Strings
 @section Strings
address@hidden Strings
 
 Strings are fixed-length sequences of characters.  They can be created
 by calling constructor procedures, but they can also literally get
@@ -1798,6 +1811,7 @@
 
 @node Regular Expressions
 @section Regular Expressions
address@hidden Regular expressions
 
 @cindex regular expressions
 @cindex regex
@@ -2285,6 +2299,7 @@
 
 @node Symbols
 @subsection Symbols
address@hidden Symbols
 
 @c FIXME::martin: Review me!
 
@@ -2505,6 +2520,7 @@
 
 @node Variables
 @subsection Variables
address@hidden Variables
 
 @c FIXME::martin: Review me!
 
@@ -2567,6 +2583,7 @@
 
 @node Keywords
 @section Keywords
address@hidden Keywords
 
 Keywords are self-evaluating objects with a convenient read syntax that
 makes them easy to type.
@@ -2795,6 +2812,7 @@
 
 @node Pairs
 @section Pairs
address@hidden Pairs
 
 @c FIXME::martin: Review me!
 
@@ -2896,6 +2914,7 @@
 
 @node Lists
 @section Lists
address@hidden Lists
 
 @c FIXME::martin: Review me!
 
@@ -3021,6 +3040,12 @@
 Return a (newly-created) copy of @var{lst}.
 @end deffn
 
address@hidden procedure make-list n [init]
+Create a list containing of @var{n} elements, where each element is
+initialized to @var{init}.  @var{init} defaults to the empty list
address@hidden()} if not given.
address@hidden deffn
+
 Note that @code{list-copy} only makes a copy of the pairs which make up
 the spine of the lists.  The list elements are not copied, which means
 that modifying the elements of the new list also modyfies the elements
@@ -3295,6 +3320,7 @@
 
 @node Vectors
 @section Vectors
address@hidden Vectors
 
 @c FIXME::martin: Review me!
 
@@ -3527,6 +3553,7 @@
 
 @node Structures
 @section Structures
address@hidden Structures
 
 [FIXME: this is pasted in from Tom Lord's original guile.texi and should
 be reviewed]
@@ -3846,6 +3873,7 @@
 
 @node Arrays
 @section Arrays
address@hidden Arrays
 
 @menu
 * Conventional Arrays::         Arrays with arbitrary data.
@@ -4106,6 +4134,7 @@
 
 @node Uniform Arrays
 @subsection Uniform Arrays
address@hidden Uniform Arrays
 
 @noindent
 @dfn{Uniform arrays} have elements all of the
@@ -4344,6 +4373,9 @@
 
 @node Association Lists
 @subsection Association Lists
address@hidden Association Lists
address@hidden Alist
+
 @cindex Association List
 @cindex Alist
 @cindex Database
@@ -4750,6 +4782,7 @@
 
 @node Hash Tables
 @subsection Hash Tables
address@hidden Hash Tables
 
 Like the association list functions, the hash table functions come
 in several varieties: @code{hashq}, @code{hashv}, and @code{hash}.
@@ -4956,6 +4989,7 @@
 
 @node Hooks
 @section Hooks
address@hidden Hooks
 
 @c FIXME::martin: Review me!
 
Index: guile/guile-core/doc/scheme-modules.texi
diff -u guile/guile-core/doc/scheme-modules.texi:1.10 
guile/guile-core/doc/scheme-modules.texi:1.11
--- guile/guile-core/doc/scheme-modules.texi:1.10       Wed May 23 10:24:50 2001
+++ guile/guile-core/doc/scheme-modules.texi    Mon Jun 18 12:08:31 2001
@@ -399,6 +399,10 @@
 @item (ice-9 documentation)
 Online documentation (REFFIXME).
 
address@hidden (srfi srfi-1)
+A library providing a lot of useful list and pair processing
+procedures (@pxref{SRFI-1}).
+
 @item (srfi srfi-2)
 Support for @code{and-let*} (@pxref{SRFI-2}).
 
Index: guile/guile-core/doc/srfi-modules.texi
diff -u guile/guile-core/doc/srfi-modules.texi:1.6 
guile/guile-core/doc/srfi-modules.texi:1.7
--- guile/guile-core/doc/srfi-modules.texi:1.6  Wed May 30 13:32:05 2001
+++ guile/guile-core/doc/srfi-modules.texi      Mon Jun 18 12:08:31 2001
@@ -15,6 +15,7 @@
 @menu
 * About SRFI Usage::            What to know about Guile's SRFI support.
 * SRFI-0::                      cond-expand
+* SRFI-1::                      List library.
 * SRFI-2::                      and-let*.
 * SRFI-6::                      Basic String Ports.
 * SRFI-8::                      receive.
@@ -157,6 +158,649 @@
 @lisp
 (cond-expand (srfi-8 'hooray))
 @end lisp
+
+
address@hidden SRFI-1
address@hidden SRFI-1 - List library
+
address@hidden FIXME::martin: Review me!
+
+The list library defined in SRFI-1 contains a lot of useful list
+processing procedures for construction, examining, destructuring and
+manipulating lists and pairs.
+
+Since SRFI-1 also defines some procedures which are already contained
+in R5RS and thus are supported by the Guile core library, some list
+and pair procedures which appear in the SRFI-1 document may not appear
+in this section.  So when looking for a particular list/pair
+processing procedure, you should also have a look at the sections
address@hidden and @ref{Pairs}.
+
address@hidden
+* SRFI-1 Constructors::         Constructing new lists.
+* SRFI-1 Predicates::           Testing list for specific properties.
+* SRFI-1 Selectors::            Selecting elements from lists.
+* SRFI-1 Length Append etc::    Length calculation and list appending.
+* SRFI-1 Fold and Map::         Higher-order list processing.
+* SRFI-1 Filtering and Partitioning::  Filter lists based on predicates.
+* SRFI-1 Searching::            Search for elments.
+* SRFI-1 Deleting::             Delete elements from lists.
+* SRFI-1 Association Lists::    Handle association lists.
+* SRFI-1 Set Operations::       Use lists for representing sets.
address@hidden menu
+
address@hidden SRFI-1 Constructors
address@hidden Constructors
+
address@hidden FIXME::martin: Review me!
+
+New lists can be constructed by calling one of the following
+procedures.
+
address@hidden procedure xcons d a
+Like @code{cons}, but with interchanged arguments.  Useful mostly when
+passed to higher-order procedures.
address@hidden deffn
+
address@hidden procedure list-tabulate n init-proc
+Return an @var{n}-element list, where each list element is produced by
+applying the procedure @var{init-proc} to the corresponding list
+index.  The order in which @var{init-proc} is applied to the indices
+is not specified.
address@hidden deffn
+
address@hidden procedure circular-list elt1 elt2 @dots{}
+Return a circular list containing the given arguments @var{elt1}
address@hidden @dots{}.
address@hidden deffn
+
address@hidden procedure iota count [start step]
+Return a list containing @var{count} elements, where each element is
+calculated as follows:
+
address@hidden + (@var{count} - 1) * @var{step}
+
address@hidden defaults to 0 and @var{step} defaults to 1.
address@hidden deffn
+
+
address@hidden SRFI-1 Predicates
address@hidden Predicates
+
address@hidden FIXME::martin: Review me!
+
+The procedures in this section test specific properties of lists.
+
address@hidden procedure proper-list? obj
+Return @code{#t} if @var{obj} is a proper list, that is a finite list,
+terminated with the empty list.  Otherwise, return @code{#f}.
address@hidden deffn
+
address@hidden procedure circular-list? obj
+Return @code{#t} if @var{obj} is a circular list, otherwise return
address@hidden
address@hidden deffn
+
address@hidden procedure dotted-list? obj
+Return @code{#t} if @var{obj} is a dotted list, return @code{#f}
+otherwise.  A dotted list is a finite list which is not terminated by
+the empty list, but some other value.
address@hidden deffn
+
address@hidden procedure null-list? lst
+Return @code{#t} if @var{lst} is the empty list @code{()}, @code{#f}
+otherwise.  If something else than a proper or circular list is passed
+as @var{lst}, an error is signalled.  This procedure is recommented
+for checking for the end of a list in contexts where dotted lists are
+not allowed.
address@hidden deffn
+
address@hidden procedure not-pair? obj
+Return @code{#t} is @var{obj} is not a pair, @code{#f} otherwise.
+This is shorthand notation @code{(not (pair? @var{obj}))} and is
+supposed to be used for end-of-list checking in contexts where dotted
+lists are allowed.
address@hidden deffn
+
address@hidden procedure list= elt= list1 @dots{}
+Return @code{#t} if all argument lists are equal, @code{#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 @var{elt=}.  If no or only one list is given,
address@hidden is returned.
address@hidden deffn
+
+
address@hidden SRFI-1 Selectors
address@hidden Selectors
+
address@hidden FIXME::martin: Review me!
+
address@hidden procedure first pair
address@hidden procedure second pair
address@hidden procedure third pair
address@hidden procedure fourth pair
address@hidden procedure fifth pair
address@hidden procedure sixth pair
address@hidden procedure seventh pair
address@hidden procedure eighth pair
address@hidden procedure ninth pair
address@hidden procedure tenth pair
+These are synonyms for @code{car}, @code{cadr}, @code{caddr}, @dots{}.
address@hidden deffn
+
address@hidden procedure car+cdr pair
+Return two values, the @sc{car} and the @sc{cdr} of @var{pair}.
address@hidden deffn
+
address@hidden procedure take lst i
address@hidden procedure take! lst i
+Return a list containing the first @var{i} elements of @var{lst}.
+
address@hidden may modify the structure of the argument list @var{lst}
+in order to produce the result.
address@hidden deffn
+
address@hidden procedure drop lst i
+Return a list containing all but the first @var{i} elements of
address@hidden
address@hidden deffn
+
address@hidden procedure take-right lst i
+Return the a list containing the @var{i} last elements of @var{lst}.
address@hidden deffn
+
address@hidden procedure drop-right lst i
address@hidden procedure drop-right! lst i
+Return the a list containing all but the @var{i} last elements of
address@hidden
+
address@hidden may modify the structure of the argument list
address@hidden in order to produce the result.
address@hidden deffn
+
address@hidden procedure split-at lst i
address@hidden procedure split-at! lst i
+Return two values, a list containing the first @var{i} elements of the
+list @var{lst} and a list containing the remaining elements.
+
address@hidden may modify the structure of the argument list
address@hidden in order to produce the result.
address@hidden deffn
+
address@hidden procedure last lst
+Return the last element of the non-empty, finite list @var{lst}.
address@hidden deffn
+
+
address@hidden SRFI-1 Length Append etc
address@hidden Length, Append, Concatenate, etc.
+
address@hidden FIXME::martin: Review me!
+
address@hidden procedure length+ lst
+Return the length of the argument list @var{lst}.  When @var{lst} is a
+circular list, @code{#f} is returned.
address@hidden deffn
+
address@hidden procedure concatenate list-of-lists
address@hidden procedure concatenate! list-of-lists
+Construct a list by appending all lists in @var{list-of-lists}.
+
address@hidden may modify the structure of the given lists in
+order to produce the result.
address@hidden deffn
+
address@hidden procedure append-reverse rev-head tail
address@hidden procedure append-reverse! rev-head tail
+Reverse @var{rev-head}, append @var{tail} and return the result.  This
+is equivalent to @code{(append (reverse @var{rev-head}) @var{tail})},
+but more efficient.
+
address@hidden may modify @var{rev-head} in order to produce
+the result.
address@hidden deffn
+
address@hidden procedure zip lst1 lst2 @dots{}
+Return a list as long as the shortest of the argument lists, where
+each element is a list.  The first list contains the first elements of
+the argument lists, the second list contains the second elements, and
+so on.
address@hidden deffn
+
address@hidden procedure unzip1 lst
address@hidden procedure unzip2 lst
address@hidden procedure unzip3 lst
address@hidden procedure unzip4 lst
address@hidden procedure unzip5 lst
address@hidden takes a list of lists, and returns a list containing the
+first elements of each list, @code{unzip2} returns two lists, the
+first containing the first elements of each lists and the second
+containing the second elements of each lists, and so on.
address@hidden deffn
+
+
address@hidden SRFI-1 Fold and Map
address@hidden Fold, Unfold & Map
+
address@hidden FIXME::martin: Review me!
+
address@hidden procedure fold kons knil lst1 lst2 @dots{}
+Fold the procedure @var{kons} across all elements of @var{lst1},
address@hidden, @dots{}.  Produce the result of
+
address@hidden(@var{kons} @var{en1} @var{en2} @dots{} (@var{kons} @var{e21}
address@hidden (@var{kons} @var{e11} @var{e12} @var{knil})))},
+
+if @var{enm} are the elements of the lists @var{lst1}, @var{lst2},
address@hidden
address@hidden deffn
+
address@hidden procedure fold-right kons knil lst1 lst2 @dots{}
+Similar to @code{fold}, but applies @var{kons} in right-to-left order
+to the list elements, that is:
+
address@hidden(@var{kons} @var{e11} @var{e12}(@var{kons} @var{e21}
address@hidden  @dots{} (@var{kons} @var{en1} @var{en2} @var{knil})))},
address@hidden deffn
+
address@hidden procedure pair-fold kons knil lst1 lst2 @dots{}
+Like @code{fold}, but apply @var{kons} to the pairs of the list
+instead of the list elements.
address@hidden deffn
+
address@hidden procedure pair-fold-right kons knil lst1 lst2 @dots{}
+Like @code{fold-right}, but apply @var{kons} to the pairs of the list
+instead of the list elements.
address@hidden deffn
+
address@hidden procedure reduce f ridentity lst
address@hidden is a variant of @code{reduce}.  If @var{lst} is
address@hidden()}, @var{ridentity} is returned.  Otherwise, @code{(fold (car
address@hidden) (cdr @var{lst}))} is returned.
address@hidden deffn
+
address@hidden procedure reduce-right f ridentity lst
+This is the @code{fold-right} variant of @var{reduce}.
address@hidden deffn
+
address@hidden procedure unfold p f g seed [tail-gen]
address@hidden is defined as follows:
+
address@hidden
+(unfold p f g seed) =
+   (if (p seed) (tail-gen seed)
+       (cons (f seed)
+             (unfold p f g (g seed))))
address@hidden lisp
+
address@hidden @var
address@hidden p
+Determines when to stop unfolding.
+
address@hidden f
+Maps each seed value to the corresponding list element.
+
address@hidden g
+Maps each seed value to next seed valu.
+
address@hidden seed
+The state value for the unfold.
+
address@hidden tail-gen
+Creates the tail of the list; defaults to @code{(lambda (x) '())}.
address@hidden table
+
address@hidden produces a series of seed values, which are mapped to list
+elements by @var{f}.  These elements are put into a list in
+left-to-right order, and @var{p} tells when to stop unfolding.
address@hidden deffn
+
address@hidden procedure unfold-right p f g seed [tail]
+Construct a list with the following loop.
+
address@hidden
+(let lp ((seed seed) (lis tail))
+   (if (p seed) lis
+       (lp (g seed)
+           (cons (f seed) lis))))
address@hidden lisp
+
address@hidden @var
address@hidden p
+Determines when to stop unfolding.
+
address@hidden f
+Maps each seed value to the corresponding list element.
+
address@hidden g
+Maps each seed value to next seed valu.
+
address@hidden seed
+The state value for the unfold.
+
address@hidden tail-gen
+Creates the tail of the list; defaults to @code{(lambda (x) '())}.
address@hidden table
+
address@hidden deffn
+
address@hidden procedure append-map f lst1 lst2 @dots{}
address@hidden procedure append-map! f lst1 lst2 @dots{}
+Equivalent to 
+
address@hidden
+(apply append (map f clist1 clist2 ...)) 
address@hidden lisp
+
+and 
+
address@hidden
+(apply append! (map f clist1 clist2 ...)) 
address@hidden lisp
+
+Map @var{f} over the elements of the lists, just as in the @code{map}
+function. However, the results of the applications are appended
+together to make the final result. @code{append-map} uses
address@hidden to append the results together; @code{append-map!} uses
address@hidden
+
+The dynamic order in which the various applications of @var{f} are
+made is not specified.
address@hidden deffn
+
address@hidden procedure map! f lst1 lst2 @dots{}
+Linear-update variant of @code{map} -- @code{map!} is allowed, but not
+required, to alter the cons cells of @var{lst1} to construct the
+result list.
+
+The dynamic order in which the various applications of @var{f} are
+made is not specified. In the n-ary case, @var{lst2}, @var{lst3},
address@hidden must have at least as many elements as @var{lst1}.
address@hidden deffn
+
address@hidden procedure pair-for-each f lst1 lst2 @dots{}
+Like @code{for-each}, but applies the procedure @var{f} to the pairs
+from which the argument lists are constructed, instead of the list
+elements.  The return value is not specified.
address@hidden deffn
+
address@hidden procedure filter-map f lst1 lst2 @dots{}
+Like @code{map}, but only results from the applications of @var{f}
+which are true are saved in the result list.
address@hidden deffn
+
+
address@hidden SRFI-1 Filtering and Partitioning
address@hidden Filtering and Partitioning
+
address@hidden FIXME::martin: Review me!
+
+Filtering means to collect all elements from a list which satisfy a
+specific condition.  Partitioning a list means to make two groups of
+list elements, one which contains the elements satisfying a condition,
+and the other for the elements which don't.
+
address@hidden procedure filter pred lst
address@hidden procedure filter! pred lst
+Return a list containing all elements from @var{lst} which satisfy the
+predicate @var{pred}.  The elements in the result list have the same
+order as in @var{lst}.  The order in which @var{pred} is applied to
+the list elements is not specified.
+
address@hidden is allowed, but not required to modify the structure of
address@hidden deffn
+
address@hidden procedure partition pred lst
address@hidden procedure partition! pred lst
+Return two lists, one containing all elements from @var{lst} which
+satisfy the predicate @var{pred}, and one list containing the elements
+which do not satisfy the predicated.  The elements in the result lists
+have the same order as in @var{lst}.  The order in which @var{pred} is
+applied to the list elements is not specified.
+
address@hidden is allowed, but not required to modify the structure of
+the input list.
address@hidden deffn
+
address@hidden procedure remove pred lst
address@hidden procedure remove! pred lst
+Return a list containing all elements from @var{lst} which do not
+satisfy the predicate @var{pred}.  The elements in the result list
+have the same order as in @var{lst}.  The order in which @var{pred} is
+applied to the list elements is not specified.
+
address@hidden is allowed, but not required to modify the structure of
+the input list.
address@hidden deffn
+
+
address@hidden SRFI-1 Searching
address@hidden Searching
+
address@hidden FIXME::martin: Review me!
+
+The procedures for searching elements in lists either accept a
+predicate or a comparison object for determining which elements are to
+be searched.
+
address@hidden procedure find pred lst
+Return the first element of @var{lst} which satisfies the predicate
address@hidden and @code{#f} if no such element is found.
address@hidden deffn
+
address@hidden procedure find-tail pred lst
+Return the first pair of @var{lst} whose @sc{car} satisfies the
+predicate @var{pred} and @code{#f} if no such element is found.
address@hidden deffn
+
address@hidden procedure take-while pred lst
address@hidden procedure take-while! pred lst
+Return the longest initial prefix of @var{lst} whose elements all
+satisfy the predicate @var{pred}.
+
address@hidden is allowed, but not required to modify the input
+list while producing the result.
address@hidden deffn
+
address@hidden procedure drop-while pred lst
+Drop the longest initial prefix of @var{lst} whose elements all
+satisfy the predicate @var{pred}.
address@hidden deffn
+
address@hidden procedure span pred lst
address@hidden procedure span! pred lst
address@hidden procedure break pred lst
address@hidden procedure break! pred lst
address@hidden splits the list @var{lst} into the longest initial prefix
+whose elements all satisfy the predicate @var{pred}, and the remaining
+tail.  @code{break} inverts the sense of the predicate.
+
address@hidden and @code{break!} are allowed, but not required to modify
+the structure of the input list @var{lst} in order to produce the
+result.
address@hidden deffn
+
address@hidden procedure any pred lst1 lst2 @dots{}
+Apply @var{pred} across the lists and return a true value if the
+predicate returns true for any of the list elements(s); return
address@hidden otherwise.  The true value returned is always the result of
+the first succesful application of @var{pred}.
address@hidden deffn
+
address@hidden procedure every pred lst1 lst2 @dots{}
+Apply @var{pred} across the lists and return a true value if the
+predicate returns true for every of the list elements(s); return
address@hidden otherwise.  The true value returned is always the result of
+the final succesful application of @var{pred}.
address@hidden deffn
+
address@hidden procedure list-index pred lst1 lst2 @dots{}
+Return the index of the leftmost element that satisfies @var{pred}.
address@hidden deffn
+
address@hidden procedure member x lst [=]
+Return the first sublist of @var{lst} whose @sc{car} is equal to
address@hidden  If @var{x} does no appear in @var{lst}, return @code{#f}.
+Equality is determined by the equality predicate @var{=}, or
address@hidden if @var{=} is not given.
address@hidden deffn
+
+
address@hidden SRFI-1 Deleting
address@hidden Deleting
+
address@hidden FIXME::martin: Review me!
+
+The procedures for deleting elements from a list either accept a
+predicate or a comparison object for determining which elements are to
+be removed.
+
address@hidden procedure delete x lst [=]
address@hidden procedure delete! x lst [=]
+Return a list containing all elements from @var{lst}, but without the
+elements equal to @var{x}.  Equality is determined by the equality
+predicate @var{=}, which defaults to @code{equal?} if not given.
+
address@hidden is allowed, but not required to modify the structure of
+the argument list in order to produce the result.
address@hidden deffn
+
address@hidden procedure delete-duplicates lst [=]
address@hidden procedure delete-duplicates! lst [=]
+Return a list containing all elements from @var{lst}, but without
+duplicate elements.  Equality of elements is determined by the
+equality predicate @var{=}, which defaults to @code{equal?} if not
+given.
+
address@hidden is allowed, but not required to modify the
+structure of the argument list in order to produce the result.
address@hidden deffn
+
+
address@hidden SRFI-1 Association Lists
address@hidden Association Lists
+
address@hidden FIXME::martin: Review me!
+
+Association lists are described in detail in section @ref{Association
+Lists}.  The present section only documents the additional procedures
+for dealing with association lists defined by SRFI-1.
+
address@hidden procedure assoc key alist [=]
+Return the pair from @var{alist} which matches @var{key}.  Equality is
+determined by @var{=}, which defaults to @code{equal?} if not given.
address@hidden must be an association lists---a list of pairs.
address@hidden deffn
+
address@hidden procedure alist-cons key datum alist
+Equivalent to
+
address@hidden
+(cons (cons @var{key} @var{datum}) @var{alist})
address@hidden lisp
+
+This procedure is used to coons a new pair onto an existing
+association list.
address@hidden deffn
+
address@hidden procedure alist-copy alist
+Return a newly allocated copy of @var{alist}, that means that the
+spine of the list as well as the pairs are copied.
address@hidden deffn
+
address@hidden procedure alist-delete key alist [=]
address@hidden procedure alist-delete! key alist [=]
+Return a list containing the pairs of @var{alist}, but without the
+pairs whose @sc{cars} are equal to @var{key}.  Equality is determined
+by @var{=}, which defaults to @code{equal?} if not given.
+
address@hidden is allowed, but not required to modify the
+structure of the list @var{alist} in order to produce the result.
address@hidden deffn
+
+
address@hidden SRFI-1 Set Operations
address@hidden Set Operations on Lists
+
address@hidden FIXME::martin: Review me!
+
+Lists can be used for representing sets of objects.  The procedures
+documented in this section can be used for such set representations.
+Man combinding several sets or adding elements, they make sure that no
+object is contained more than once in a given list.  Please note that
+lists are not a too efficient implementation method for sets, so if
+you need high performance, you should think about implementing a
+custom data structure for representing sets, such as trees, bitsets,
+hash tables or something similar.
+
+All these procedures accept an equality predicate as the first
+argument.  This predicate is used for testing the objects in the list
+sets for sameness.
+
address@hidden procedure lset<= = list1 @dots{}
+Return @code{#t} if every @var{listi} is a subset of @var{listi+1},
+otherwise return @code{#f}.  Returns @code{#t} if called with less
+than two arguments. @var{=} is used for testing element equality.
address@hidden deffn
+
address@hidden procedure lset= = list1 list2 @dots{}
+Return @code{#t} if all argument lists are equal. @var{=} is used for
+testing element equality.
address@hidden deffn
+
address@hidden procedure lset-adjoin = list elt1 @dots{}
address@hidden procedure lset-adjoin! = list elt1 @dots{}
+Add all @var{elts} to the list @var{list}, suppressing duplicates and
+return the resulting list.  @code{lset-adjoin!} is allowed, but not
+required to modify its first argument. @var{=} is used for testing
+element equality.
address@hidden deffn
+
address@hidden procedure lset-union = list1 @dots{}
address@hidden procedure lset-union! = list1 @dots{}
+Return the union of all argument list sets.  The union is the set of
+all elements which appear in any of the argument sets.
address@hidden is allowed, but not required to modify its first
+argument. @var{=} is used for testing element equality.
address@hidden deffn
+
address@hidden procedure lset-intersection = list1 list2 @dots{}
address@hidden procedure lset-intersection! = list1 list2 @dots{}
+Return the intersection of all argument list sets.  The intersection
+is the set containing all elements which appear in all argument sets.
address@hidden is allowed, but not required to modify its
+first argument. @var{=} is used for testing element equality.
address@hidden deffn
+
address@hidden procedure lset-difference = list1 list2 @dots{}
address@hidden procedure lset-difference! = list1 list2 @dots{}
+Return the difference of all argument list sets.  The difference is
+the the set containing all elements of the first list which do not
+appear in the other lists.  @code{lset-difference!}  is allowed, but
+not required to modify its first argument. @var{=} is used for testing
+element equality.
address@hidden deffn
+
address@hidden procedure lset-xor = list1 @dots{}
address@hidden procedure lset-xor! = list1 @dots{}
+Return the set containing all elements which appear in the first
+argument list set, but not in the second; or, more generally: which
+appear in an odd number of sets.  @code{lset-xor!}  is allowed, but
+not required to modify its first argument. @var{=} is used for testing
+element equality.
address@hidden deffn
+
address@hidden procedure lset-diff+intersection = list1 list2 @dots{}
address@hidden procedure lset-diff+intersection! = list1 list2 @dots{}
+Return two values, the difference and the intersection of the argument
+list sets. This works like a combination of @code{lset-difference} and
address@hidden, but is more efficient.
address@hidden  is allowed, but not required to modify
+its first argument. @var{=} is used for testing element equality.  You
+have to use some means to deal with the multiple values these
+procedures return (@pxref{Multiple Values}).
address@hidden deffn
 
 
 @node SRFI-2



reply via email to

[Prev in Thread] Current Thread [Next in Thread]