Simple Lookup Table
Purports to be a simple key -> value lookup table. Known as a 'Dictionary' in some circles. It attempts to optimize for speed of lookup by choosing different storage models.
Sets or gets the safe execution mode.
Enables or disables argument validation. Also literal object return.
Returns a dictionary using the supplied EQUALITY test, optimized for the number of elements ESTIMATE.
Returns a dictionary constructed from ALIST using the supplied EQUALITY test, and optional ESTIMATE.
Is the OBJECT a dictionary?
Returns the equality test predicate procedure for DICT.
Returns the number of items in the DICT.
Returns the keys in the DICT.
Returns the values in the DICT.
Returns the DICT as an association list. The result may not be mutated!
Returns the value associated with KEY in the DICT, otherwise DEFAULT.
Does an entry with KEY exist in the DICT?
Associate VALUE with KEY in the DICT.
VALUE must not be (void)
!
Invokes FUNC on either the existing value for KEY in the DICT, or the result of the DEFAULT-VALUE-PROCEDURE when no existing value. The result then becomes the value for KEY in the DICT.
Returns the updated value for KEY in the DICT.
DEFAULT-VALUE-PROCEDURE must not return (void)
!
Updates the value for KEY in the DICT with a list of OBJECT.
Updates the value for KEY in the DICT with a dictionay.
Removes any association of KEY in the DICT.
Invokes the supplied PROCEDURE with each association in the DICT.
Returns the DICT as the union of (DICT DICT-1 ...) using overwrite semantics.
Tables must have the same equality predicate.
Accepts a PROCEDURE of two arguments, key and value. When the procedure returns #t
this procedure returns the value. Otherwise the DEFAULT value is returned.
Pretty-print DICT to PORT.
Copyright (c) 2005, Kon Lovett. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.