code: public static <S> State<S, Unit> modify(Fn1<? super S, ? extends S> fn) {
          return state(both(constantly(UNIT), fn));
      }
docs: Create a {@link State} that maps its initial state into its final state, returning a {@link Unit} result type.
  
  @param fn  the mapping function
  @param <S> the state type
  @return the new {@link State} instance