I am searching some swi-prolog predicate:
list_to_dict(List, Dict) :- ??
Which is able to convert a list like
l = [a, b, c, d]
into a Prolog dict d whose keys are equal to the list indexes starting at 1. In this example above d is of form:
d = dict_label{1:a,2:b,3:c,4:d}
I would appreciate, if you can help me to find some general and hopefully short solution of that problem.