[ cl-cookbook-Bugs-538880 ] First part for the Hash Tables section

[email protected] Wed, 03 Apr 2002 11:08:33 -0800
Newsgroups gmane.lisp.cookbook
Message-ID <[email protected]>
Bugs item #538880, was opened at 2002-04-03 18:56
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=447472&aid=538880&group_id=46815

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: First part for the Hash Tables section

Initial Comment:
Introduction

Hash Tables are a powerful data structure, associating
keys with values in a very efficient way. Hash Tables
are preferred over association lists whenever
performance is an issue and there are more than just a
few key-value pairs to maintain.

Creating a Hash Table

Hash Tables are created using the function
MAKE-HASH-TABLE. It has no required argument. Its most
used optional keyword argument is :TEST, specifying the
function used to test the equality of keys.

Getting a value from a Hash Table

The function GETHASH takes two required arguments: a
key and a hash table. It returns two values: the value
corresponding to the key in the hash table (or NIL if
not found), and a boolean indicating whether the key
was found in the table. That second value is necessary
since NIL is a valid value in a key-value pair, so
getting NIL as first value from GETHASH does not
necessarily mean that the key was not found in the
table.


----------------------------------------------------------------------

Comment By: Matthieu Villeneuve (mvilleneuve)
Date: 2002-04-03 19:08

Message:
Logged In: YES 
user_id=504831

Please disregard this one, submitted a bit too early. Refer
to #538888 instead.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=447472&aid=538880&group_id=46815