The function appears to apply a different rule to each input word, so there is no single domain where the rule holds.

Is this a correct description of the function? Do you have any other inputs you would like me to test?