! increments the value for the given key or sets it to 1 if key not found : at++ ( key assoc -- ) 1 -rot at+ ; ! count the number of occurrences of each char in str : count-char-frequency ( str -- hashtable ) H{ } tuck [ at++ ] curry each ;