The function f(x) takes a word input and applies the rule of duplicating the first letter of the word.

