code: public <B> State<S, B> mapState(Fn1<? super Tuple2<A, S>, ? extends Product2<B, S>> fn) {
          return state(s -> fn.apply(run(s)));
      }
docs: Map both the result and the final state to a new result and final state.
  
  @param fn  the mapping function
  @param <B> the potentially new final state type
  @return the mapped {@link State}