As you mentioned, redundancy is needed to prevent statedue to inaccessibility.
Making it cleaner is just a coding issue. Here are two solutions that come to mind:
state = if some_condition, do: modify_my_state(state), else: state
- :
state = modify_my_state(state, some_condition)
modify_my_state/2:
defp modify_my_state(state, true), do: modify_my_state(state)
defp modify_my_state(state, false), do: state