If you want to avoid getting the variable for each key/value, I'd say the idiomatic way to go would be to get jsvar-encode? outside and currify it into the quotation: M: hashtable json-print ( hashtable -- ) CHAR: { write1 jsvar-encode? get '[ [ swap _ [ jsvar-encode ] when >json % CHAR: : , >json % ] "" make ] { } assoc>map "," join write CHAR: } write1 ; (or something along these lines..)