DIRECTORY Basics USING [Comparison], Rope USING [ROPE]; RopeList: CEDAR DEFINITIONS = BEGIN CompareProc: TYPE = PROC [r1, r2: Rope.ROPE] RETURNS [Basics.Comparison]; EqualLists: PROC [l1, l2: LIST OF Rope.ROPE, case: BOOL _ TRUE] RETURNS [BOOL]; Memb: PROC [list: LIST OF Rope.ROPE, r: Rope.ROPE, case: BOOL _ TRUE] RETURNS [BOOL]; Cons: PROC [list: LIST OF Rope.ROPE, r: Rope.ROPE] RETURNS [LIST OF Rope.ROPE] = INLINE { RETURN[CONS[r, list]]; }; Append: PROC [l1, l2: LIST OF Rope.ROPE] RETURNS [LIST OF Rope.ROPE]; CopyTopList: PROC [list: LIST OF Rope.ROPE] RETURNS [LIST OF Rope.ROPE] = INLINE { RETURN[Append[list, NIL]]; }; Remove: PROC [list: LIST OF Rope.ROPE, r: Rope.ROPE, case: BOOL _ TRUE] RETURNS [LIST OF Rope.ROPE]; Reverse: PROC [list: LIST OF Rope.ROPE] RETURNS [LIST OF Rope.ROPE]; DAppend: PROC [l1, l2: LIST OF Rope.ROPE] RETURNS [LIST OF Rope.ROPE]; DRemove: PROC [list: LIST OF Rope.ROPE, r: Rope.ROPE, case: BOOL _ TRUE] RETURNS [LIST OF Rope.ROPE]; DReverse: PROC [list: LIST OF Rope.ROPE] RETURNS [LIST OF Rope.ROPE]; Length: PROC [list: LIST OF Rope.ROPE] RETURNS [INT]; Map: PROC [list: LIST OF Rope.ROPE, proc: PROC [Rope.ROPE]]; Sort: PROC [list: LIST OF Rope.ROPE, compareProc: CompareProc] RETURNS [LIST OF Rope.ROPE]; Compare: CompareProc; IgnoreCase: CompareProc; END. ŽRopeList.mesa This interface provides some utilities for manipulating lists of ropes. Last Edited by: Stewart.pa, December 15, 1983 6:46 pm Useful types. Here are a collection of useful types. Predicates. Are the lists element by element Rope.Equal[case]? Is the given rope on the list? Constructors. These procedures do not disturb their arguments. Copies l1 then attaches l2 to the end of it. If l2 is NIL, copies top level of l1. Returns a copy of the list. Remove the given rope from the list, if it is there. Removes all matching elements Reverse the list. Destructive Constructors. Like the constructors above, but these avoid CONSing by destroying the list passed in as an argument. Appends l2 to the end of l1. Remove the given rope from the list, if it is there. Removes only the first matching element. Reverse the list. Miscellaneous. Count the number of elements. Call proc with each element of the list. Sorting. Sorts the list according to CompareProc. Sort is destructive. Compares according to CHAR order. Compares according to CHAR order except that case distinctions are ignored. December 15, 1983 6:20 pm, Stewart, copied from List.mesa Κ’– "Cedar" style˜head™ IbodyšœG™GLšœ5™5code2šΟk ˜ Mšœœ˜Mšœœœ˜——šœ œ œ˜Mš˜—™ L™&Mš Οn œœœœœ˜I—šœ ™ šž œœ œœœœœœœ˜OM™2—šžœœœœœ œœœœœ˜UM™——šœ ™ L™0šžœœœœœ œœœœœœ˜ZMšœœ ˜M˜—šžœœ œœœœœœœ˜EMšœ1Οc"™S—šž œœœœœœœœœœ˜RMšœœ˜M˜M™—šžœœœœœ œœœœœœœ˜dMšœS™S—šžœœœœœœœœœ˜DM™——šœ™L™ešžœœ œœœœœœœ˜FM™—šžœœœœœ œœœœœœœ˜eMšœ^™^—šžœœœœœœœœœ˜EM™——šœ™šžœœœœœœœ˜5M™—šžœœœœœœœ˜™>—šœ˜Mšœ!™!—šœ˜MšœK™K——J˜Jšœ˜M™9—…— :