/[guile]/guile/guile-core/doc/ref/srfi-modules.texi
ViewVC logotype

Diff of /guile/guile-core/doc/ref/srfi-modules.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by kryde, Fri Jul 18 00:51:42 2003 UTC revision 1.21 by kryde, Fri Aug 29 23:30:00 2003 UTC
# Line 774  spine of the list as well as the pairs a Line 774  spine of the list as well as the pairs a
774    
775  @deffn {Scheme Procedure} alist-delete key alist [=]  @deffn {Scheme Procedure} alist-delete key alist [=]
776  @deffnx {Scheme Procedure} alist-delete! key alist [=]  @deffnx {Scheme Procedure} alist-delete! key alist [=]
777  Return a list containing the pairs of @var{alist}, but without the  Return a list containing the elements of @var{alist} but with those
778  pairs whose @sc{cars} are equal to @var{key}.  Equality is determined  elements whose keys are equal to @var{key} deleted.  The returned
779  by @var{=}, which defaults to @code{equal?} if not given.  elements will be in the same order as they were in @var{alist}.
780    
781  @code{alist-delete!} is allowed, but not required to modify the  Equality is determined by the @var{=} predicate, or @code{equal?} if
782  structure of the list @var{alist} in order to produce the result.  not given.  The order in which elements are tested is unspecified, but
783    each equality call is made @code{(= key alistkey)}, ie. the given
784    @var{key} parameter is first and the key from @var{alist} second.
785    This means for instance all associations with a key greater than 5 can
786    be removed with @code{(alist-delete 5 alist <)}.
787    
788    @code{alist-delete} does not modify @var{alist}, but the return might
789    share a common tail with @var{alist}.  @code{alist-delete!} may modify
790    the list structure of @var{alist} to construct its return.
791  @end deffn  @end deffn
792    
793    

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26