if you need to use hashes you can use Dicts, but for small number of kv-pairs it is overkill.
In such cases use the HashList that I invented ;). It is very easy and you can use it as a Two way Hash too. Very handy. Uses lambda.
check here : HashList
%% HashList utils : [ key1:val1, key2:val2, ... ], also can be used as TwoWaysHash keys(HL,Res) :- maplist(\I^K^(I = K:_),HL,Res). vals(HL,Res) :- maplist(\I^V^(I = _:V),HL,Res). val(Key,HL,Res) :- member(Key:Res,HL). key(Val,HL,Res) :- member(Res:Val,HL).