Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!ubc-cs!uw-beaver!mit-eddie!wuarchive!usc!jarthur!sburke From: sburke@jarthur.Claremont.EDU (Scott Burke) Newsgroups: comp.sys.handhelds Subject: Re: Questions Regarding Lists & The Solver Message-ID: <10888@jarthur.Claremont.EDU> Date: 19 Feb 91 22:20:16 GMT References: <1991Feb19.080133.24204@bronze.ucs.indiana.edu> <20339@shlump.nac.dec.com> Organization: Harvey Mudd College, Claremont, CA 91711 Lines: 23 Jim Donnelly's Toolkit contains a few words that are useful when it comes to extracting atoms from lists. Atoms? You must be a LISPer. Anyways... DIFF takes { A B C } { B } and returns { A C } takes { 1 2 3 4 } { 5 6 } and returns { 1 2 3 4 } takes { 1 2 3 4 } { 3 4 5 } and returns { 1 2 } SDIFF takes { 1 2 3 4 } { 5 6 } and returns { 1 2 3 4 5 6 } takes { 1 2 3 4 } { 3 4 5 } and returns { 1 2 5 } (SDIFF is the set symmetric difference; DIFF merely the set difference) Other useful set commands in the Toolkit are: ADJOIN: Adds an object to a list if it is unique INTERSECT: Returns the set intersection between two lists \->SET: Removes duplicate objects from a list UNION: Returns the set union of two lists The Toolkit is highly recommended by me. It is available from EduCalc. Scott. sburke@jarthur.claremont.edu