code: public static <T, R> R functionByBoolean(boolean bool, T target,
              Function<T, R> trueFunction, Function<T, R> falseFunction) {
          return bool ? trueFunction.apply(target) : falseFunction.apply(target);
      }
docs: Function by boolean r.
  
  @param <T>           the type parameter
  @param <R>           the type parameter
  @param bool          the bool
  @param target        the target
  @param trueFunction  the true function
  @param falseFunction the false function
  @return the r