s c h e m a t i c s : c o o k b o o k

/ Cookbook.HashIntroduction

This Web


WebHome 
WebChanges 
TOC (with recipes)
NewRecipe 
WebTopicList 
WebStatistics 

Other Webs


Chicken
Cookbook
Erlang
Know
Main
Plugins
Sandbox
Scm
TWiki  

Schematics


Schematics Home
Sourceforge Page
SchemeWiki.org
Original Cookbook
RSS

Scheme Links


Schemers.org
Scheme FAQ
R5RS
SRFIs
Scheme Cross Reference
PLT Scheme SISC
Scheme48 SCM
MIT Scheme scsh
JScheme Kawa
Chicken Guile
Bigloo Tiny
Gambit LispMe
GaucheChez

Lambda the Ultimate
TWiki.org

Introduction

PLT Scheme provides basic, but useful and fast ways of manipulating hashes. A hash table is used to store a collection of data values associated with keys.

To create a hash table use make-hash-table, which receives two optional arguments to create tables with weakly-held keys, and to use different comparison procedures. We will discuss this variations later, so for the time being something like:

(make-hash-table)

creates a new hash table. By default this table will compare keys using eq?. If you want to use keys that need a stronger equality test (i.e., strings), you can provide make-hash-table with the argument equal:

(make-hash-table 'equal)

In the following recipes we will discuss ways to manipulate our newly created hash table.

-- KarlaRamirez - 19 May 2004

-- GordonWeakliem - 17 Sep 2004

CookbookForm
TopicType: Section
ParentTopic: HashChapter
TopicOrder: 010

 
 
Copyright © 2004 by the contributing authors. All material on the Schematics Cookbook web site is the property of the contributing authors.
The copyright for certain compilations of material taken from this website is held by the SchematicsEditorsGroup - see ContributorAgreement & LGPL.
Other than such compilations, this material can be redistributed and/or modified under the terms of the GNU Lesser General Public License (LGPL), version 2.1, as published by the Free Software Foundation.
Ideas, requests, problems regarding Schematics Cookbook? Send feedback.
/ You are Main.guest