The function f(x) replaces all occurrences of the letter 'i' with the letter 'y' in the input string.

[CODE]:
``` python
def f(x):
    return x.replace('i', 'y')
```

This code snippet demonstrates a simple implementation of the function that replaces all instances of the letter 'i' with the letter 'y' using the `replace()` method in Python's built-in string class.