

                                                                  cotruncate
                                                                       until
                                                                    until-if

    FUNCTION
COTRUNCATE &rest SERIES-INPUTS                                   [Function]
UNTIL BOOLS &rest SERIES-INPUTS                                  [Function]
UNTIL-IF PRED &rest SERIES-INPUTS                                [Function]

    Package
    series

    DESCRIPTION

Each of these functions accepts one or more series inputs S1, ..., SN as
its &REST argument and returns N series outputs T1, ..., TN that contain
the same elements in the same order---that is, TI[j]=SI[j].  Let K be the
length of the shortest input SI.  COTRUNCATE truncates the series so that
each output has length K.  Let K' be the position of the first element in
the boolean series BOOLS that is not NIL or, if every element is NIL, the
length of BOOLS.  UNTIL truncates the series so that each output has length
(MIN K K').  Let K'' be the position of the first element in S1 such that
(PRED S1[K'']) is not NIL or, if there is no such element, the length of
S1.  UNTIL-IF truncates the series so that each output has length (MIN K K'').

(COTRUNCATE #Z(1 2 -3 4) #Z(A B C)) => #Z(1 2 -3) and #Z(A B C) 
(UNTIL #Z(NIL NIL T NIL) #Z(1 2 -3 4) #Z(A B C)) => #Z(1 2) and #Z(A B) 
(UNTIL-IF #'MINUSP #Z(1 2 -3 4) #Z(A B C)) => #Z(1 2) and #Z(A B)


     SEE ALSO
     about-series
     about-generators

;Copyright 1989 by the Massachusetts Institute of Technology,
;Cambridge, Massachusetts.

;Permission to use, copy, modify, and distribute this software and its
;documentation for any purpose and without fee is hereby granted,
;provided that this copyright and permission notice appear in all
;copies and supporting documentation, and that the name of M.I.T. not
;be used in advertising or publicity pertaining to distribution of the
;software without specific, written prior permission. M.I.T. makes no
;representations about the suitability of this software for any
;purpose.  It is provided "as is" without express or implied warranty.

;    M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
;    ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
;    M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
;    ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
;    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
;    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
;    SOFTWARE.



