This function requires an immutable hash table. To scan the values in a mutable hash table, use scan(values x, f).