We can optionally provide a function that will transform the key
before using it as an index.