Update dict.h

add iter interface, grouping functions