ImmutablePropList.mesa
Copyright © 1984, 1985 by Xerox Corporation. All rights reserved.
Doug Wyatt, March 7, 1985 2:46:26 pm PST
Implements immutable, sharable property lists.
DIRECTORY
Atom USING [PropList];
ImmutablePropList: CEDAR DEFINITIONS
~ BEGIN
PropList: TYPE ~ Atom.PropList;
Put: PROC[propList: PropList, key: REF, val: REF] RETURNS[PropList];
Returns a new list which contains (key, val). Get[Put[anyPropList, key, val], key]=val.
Get: PROC[propList: PropList, key: REF] RETURNS[val: REF];
Returns val associated with key, NIL if none. Uses REF equality to compare keys.
Rem: PROC[propList: PropList, key: REF] RETURNS[PropList];
Returns a new list which does not contain key. Equivalent to Put[propList, key, NIL].
END.