code: public static <S, A> State<S, A> gets(Fn1<? super S, ? extends A> fn) {
          return state(both(fn, id()));
      }
docs: Create a {@link State} that maps its initial state into its result, but leaves the initial state unchanged.
  
  @param fn  the mapping function
  @param <S> the state type
  @param <A> the result type
  @return the new {@link State} instance