Availability:C-language interface function
int PL_for_dict(term_t 
dict, int (*func)(term_t key, term_t value, void *closure), void 
*closure, int flags)Iterates over dict, calling func for each item. In 
each call, key and value are the processed item's 
key-value pair and the closure argument is passed from the 
call to
PL_for_dict(). 
If func returns a non-0 value, the iteration 
stops and PL_for_dict() 
returns that value; otherwise, all pairs are processed and PL_for_dict() 
returns 0. If
flags contains PL_FOR_DICT_SORTED, the key-value 
pairs are processed in the standard order of terms; otherwise the 
processing order is unspecified.