Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Hash tables keys and values
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-05-23 (18:24)
From: Vincent Foley <vinfoley@i...>
Subject: [Caml-list] Hash tables keys and values
Hi, I have a hashtables of all 26 characters of the alphabet: these are
my keys.  They are all associated with the number of times they appear
in an arbitrary text file.  Once I have my hash table complete, I would
like to print each key with its associated value.  How would I do this?
Right now I only have the values:

   Hashtbl.iter (fun k -> Printf.printf "%d\n") myhash;

Is there any way I could print both keys and values?

Thank you,

Vincent Foley


Vincent Foley-Bourgon
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: