I wanted to generate dictionary like below
a = {'A' => [1,2,3], 'B' => [12,13], 'C' => [32,432]} var h = {} gen_h(['A', 1]) gen_h(['A', 2]) gen_h(['B', 13]) gen_h(['C', 32]) gen_h(['C', 432])
should give h value as -
h = {'A' => [1,2], 'B' => [13], 'C' => [32,432]}
function gen_h(['A', 1])
? Shouldn't this just begen_h(['A', 1])
?a
to do with all of this?key
value
pair
hash
not MD5 hash