AMList.mesa
edited by Teitelman, December 14, 1982 3:45 pm
edited by Paul Rovner, May 13, 1983 10:24 am
DIRECTORY
SafeStorage USING [Type, nullType];
AMList: CEDAR DEFINITIONS =
BEGIN OPEN SafeStorage;
IsAList: PROC [ref: REF ANYNIL, underType: Type ← nullType] RETURNS [result: BOOLEAN];
IsAListOfRefAny: PROC [ref: REF ANY, underType: Type ← nullType] RETURNS [result: BOOLEAN, list: LIST OF REF ANY];
EqLists: PUBLIC PROC [l1, l2: LIST OF REF ANY, compareLists: BOOLEANFALSE] RETURNS [BOOLEAN] ;
true if each of the corresponding elements of l1 and l2 are =. If compareLists is TRUE, then for corresponding elements of l1, l2 that are of type LIST OF REF ANY, will compare the two elements using EqLists recursively. For more general comparisons, see RefAnyOps.Equal.
Member: PROC [ref: REF ANY, list: LIST OF REF ANY] RETURNS[BOOLEAN];
same as List.Memb except uses RefAnyOps.EqualRefs to compare ref against each element.
END.