(DEFINE-FILE-INFO READTABLE "XCL" PACKAGE "INTERLISP") (FILECREATED "14-Apr-88 12:37:05" {ERINYES}LYRIC>UTILISOPRS.\;1 2918 |changes| |to:| (FNS |FIntersection| |FUnion|) |previous| |date:| "24-Mar-87 19:54:30" |{XDE:MCS:STANFORD}LYRIC>UTILISOPRS.;1|) ; Copyright (c) 1988 by Xerox Corporation. All rights reserved. (PRETTYCOMPRINT UTILISOPRSCOMS) (RPAQQ UTILISOPRSCOMS ((I.S.OPRS COLLECTWHEN INTERSECT MAXIMIZE MINIMIZE REPEATEACHTIME UNION UNIQUE YIELD FIRSTTIME |fintersect| |funion|) (ADDVARS (LOCALVARS $$STATE $$TMP $$UIV $$UNQ $$FLTR) (SYSLOCALVARS $$STATE $$TMP $$UIV $$UNQ $$FLTR)) (FNS |FIntersection| |FUnion|))) (DECLARE\: EVAL@COMPILE (I.S.OPR 'COLLECTWHEN NIL '(|bind| $$FLTR |when| (SETQ $$FLTR BODY) |collect| $$FLTR)) (I.S.OPR 'INTERSECT '(PROGN (INTBOD _ BODY) (OR ($$VAL _ (COND ($$VAL (INTERSECTION $$VAL INTBOD)) (T INTBOD))) (GO $$OUT))) '(BIND INTBOD)) (I.S.OPR 'MAXIMIZE NIL '(|largest| BODY |yield| $$EXTREME)) (I.S.OPR 'MINIMIZE NIL '(|smallest| BODY |yield| $$EXTREME)) (I.S.OPR 'REPEATEACHTIME NIL '(|repeatuntil| (PROGN BODY NIL))) (I.S.OPR 'UNION '($$VAL _ (UNION $$VAL BODY))) (I.S.OPR 'UNIQUE '(|if| $$VAL |then| ($$VAL_ NIL) (GO $$OUT) |else| $$VAL _ $$UNQ $$UIV _ I.V.) '(|bind| ($$UNQ $$UIV) |when| $$UNQ _ BODY |finally| (I.V._ (AND $$VAL $$UIV)))) (I.S.OPR 'YIELD NIL '(FINALLY (RETURN BODY))) (I.S.OPR 'FIRSTTIME NIL '(|bind| ($$MEMO _ T) |unless| (AND $$MEMO (PROGN BODY T) (SETQ $$MEMO NIL)))) (I.S.OPR '|fintersect| '(PROGN (INTBOD _ BODY) (OR ($$VAL _ (COND ($$VAL (|FIntersection| $$VAL INTBOD)) (T INTBOD))) (GO $$OUT))) '(BIND INTBOD)) (I.S.OPR '|funion| '($$VAL _ (|FUnion| $$VAL BODY))) ) (ADDTOVAR LOCALVARS $$STATE $$TMP $$UIV $$UNQ $$FLTR) (ADDTOVAR SYSLOCALVARS $$STATE $$TMP $$UIV $$UNQ $$FLTR) (DEFINEQ (|FIntersection| (LAMBDA (X Y) (* TAL "27-OCT-82 17:54") (|for| |item| |in| X |when| (FMEMB |item| Y) |collect| |item|))) (|FUnion| (LAMBDA (X Y) (* TAL "28-OCT-82 12:00") (|bind| (|tmp| _ Y) |for| |item| |in| X |unless| (FMEMB |item| |tmp|) |do| (|push| |tmp| |item|) |finally| (RETURN |tmp|)))) ) (PUTPROPS UTILISOPRS COPYRIGHT ("Xerox Corporation" 1988)) (DECLARE\: DONTCOPY (FILEMAP (NIL (2350 2836 (|FIntersection| 2360 . 2560) (|FUnion| 2562 . 2834))))) STOP