The domain of the function where the rule applies is any word. There does not appear to be any part of the domain where the rule does not hold.

Please let me know if you would like me to test the function on any additional words or if you have any further questions.