RosettaCodeData/Task/Hash-from-two-arrays/Standard-ML/hash-from-two-arrays-2.ml
2023-07-01 13:44:08 -04:00

7 lines
219 B
Standard ML

exception NotFound;
val keys = [ "foo", "bar", "baz" ]
and vals = [ 16384, 32768, 65536 ]
and hash = HashTable.mkTable (HashString.hashString, op=) (42, NotFound);
ListPair.appEq (HashTable.insert hash) (keys, vals);