:- use_module(library(prolog_stack)). :- use_module(library(error)). is_dict(T) :- is_assoc(T). dict_new(T) :- T=t{}. dict_set(T,X,V,T2) :- put_dict([X=V],T,T2). dict_get(T,X,V,T2) :- get_dict(X, T, V).%t{X=V}.