code: public State<S, A> withState(Fn1<? super S, ? extends S> fn) {
          return state(s -> run(fn.apply(s)));
      }
docs: Map the final state to a new final state using the provided function.
  
  @param fn the state-mapping function
  @return the mapped {@link State}