(/invertdict)
(makes inverted dictionary from dictionary on top of stack)
(.dup .maxlength .dict .exch
(3 2 .roll .dup 4 2 .roll .exch .put)
.dictforall)
/def

(/doubledict)
(replaces dictionary on top of stack with double length one having same contents)
(.dup .maxlength 2 .mul .dict .exch
(3 2 .roll .dup 4 2 .roll .put)
.dictforall)
/def