I would need some help on how I can define a recursive function $f$ on $\{a, b\}$*
Define a recursive function $f$ on $\{a, b\}$* which replaces any $a$ with $b$ and vice versa, for example, $f(aba) = bab$ and $f(aaabbb) = bbbaaa$
I would appreciate hints and/or examples or atleast how I need to think to solve a task like this one.
Thank YOU.