Task

The goal is to create an associative array (also known as a dictionary, map, or hash).



Related tasks:

 Associative arrays/Iteration
 Hash from two arrays


See also

 Array
 Associative array: Creation, Iteration
 Collections
 Compound data type
 Doubly-linked list: Definition, Element definition, Element insertion, List Traversal, Element Removal
 Linked list
 Queue: Definition, Usage
 Set
 Singly-linked list: Element definition, Element insertion, List Traversal, Element Removal
 Stack


Hash Bar is a room.
 
Connection relates various texts to one number. The verb to be connected to implies the connection relation.
 
"foo" is connected to 12.
"bar" is connected to 34.
"baz" is connected to 56.
 
When play begins:
	[change values]
	now "bleck" is connected to 78;
	[check values]
	if "foo" is connected to 12, say "good.";
	if "bar" is not connected to 56, say "good.";
	[retrieve values]
	let V be the number that "baz" relates to by the connection relation;
	say "'baz' => [V].";
	end the story.