As one learns from a course on data structures, hash maps or dictionaries can be efficient when applied to appropriate tasks.

I need a hash map in *Mathematica* and I've never found it. I'm scratching in one of my notebooks files, and I find myself still using the following code ([Leonid Shifrin](https://groups.google.com/forum/#!msg/comp.soft-sys.math.mathematica/IOpg3SGB6w0/Ha0TpoSJuEEJ)) to simulate this data structure.

```
ClearAll[linkedList, toLinkedList, fromLinkedList, addToList, pop, emptyList];
SetAttributes[linkedList, HoldAllComplete];
toLinkedList[data_List] := 
  Fold[linkedList, linkedList[], data];
fromLinkedList[ll_linkedList] := 
   List @@ Flatten[ll, Infinity, linkedList];

addToList[ll_, value_] := linkedList[ll, value];
pop[ll_] := Last@ll;
emptyList[] := linkedList[];

ClearAll[makeHash];
makeHash[] := Module[{hash}, 
   hash[_] := emptyList[];
   hash /: add[hash, key_, value_] := ash[key] = addToList[hash[key], value];
   hash /: get[hash, key_] := fromLinkedList@hash[key];
   Return[hash]];

```

I was wondering if any of you had needed a dictionary. If you have, I would like know how you implemented it. I'm interested to use a `map<string, int>`.