From 6a558a8c15a1192627961152471b01d73e74a6e7 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 14 Nov 2001 05:53:37 +0000 Subject: [PATCH] Update for name changes in runtime system: list-transform-positive => keep-matching-items list-transform-negative => delete-matching-items list-search-positive => find-matching-item --- v7/doc/ref-manual/scheme.texinfo | 34 +++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/v7/doc/ref-manual/scheme.texinfo b/v7/doc/ref-manual/scheme.texinfo index db13bb74c..38605715e 100644 --- a/v7/doc/ref-manual/scheme.texinfo +++ b/v7/doc/ref-manual/scheme.texinfo @@ -2,7 +2,7 @@ @iftex @finalout @end iftex -@comment $Id: scheme.texinfo,v 1.95 2001/07/17 02:36:50 cph Exp $ +@comment $Id: scheme.texinfo,v 1.96 2001/11/14 05:53:37 cph Exp $ @comment %**start of header (This is for running Texinfo on a region.) @setfilename scheme.info @settitle MIT Scheme Reference @@ -7235,18 +7235,24 @@ procedure. @cindex filtering, of list @cindex deletion, of list element -@deffn {procedure+} list-transform-positive list predicate -@deffnx {procedure+} list-transform-negative list predicate +@deffn {procedure+} keep-matching-items list predicate +@deffnx {procedure+} delete-matching-items list predicate These procedures return a newly allocated copy of @var{list} containing only the elements for which @var{predicate} is (respectively) true or false. @var{Predicate} must be a procedure of one argument. @example @group -(list-transform-positive '(1 2 3 4 5) odd?) @result{} (1 3 5) -(list-transform-negative '(1 2 3 4 5) odd?) @result{} (2 4) +(keep-matching-items '(1 2 3 4 5) odd?) @result{} (1 3 5) +(delete-matching-items '(1 2 3 4 5) odd?) @result{} (2 4) @end group @end example + +@findex list-transform-positive +@findex list-transform-negative +For compatibility, the procedure @code{list-transform-positive} is an +alias for @code{keep-matching-items}, and @code{list-transform-negative} +is an alias for @code{delete-matching-items}. @end deffn @deffn {procedure+} delq element list @@ -7345,14 +7351,18 @@ with the appropriate elements removed. The procedure returned by @section Searching Lists @cindex searching, of list -@deffn {procedure+} list-search-positive list predicate -@deffnx {procedure+} list-search-negative list predicate +@deffn {procedure+} find-matching-item list predicate Returns the first element in @var{list} for which @var{predicate} is -(respectively) true or false; returns @code{#f} if it doesn't find such -an element. (This means that if @var{predicate} is true (false) for -@code{#f}, it may be impossible to distinguish a successful result from -an unsuccessful one.) @var{Predicate} must be a procedure of one -argument. +true; returns @code{#f} if it doesn't find such an element. (This means +that if @var{predicate} is true for @code{#f}, it may be impossible to +distinguish a successful result from an unsuccessful one.) +@var{Predicate} must be a procedure of one argument. + +@findex list-search-positive +@findex list-search-negative +For compatibility, @code{list-search-positive} is an alias for +@code{find-matching-item}. @code{list-search-negative} is similar but +the sense of the predicate is reversed. @end deffn @deffn procedure memq object list -- 2.25.1