code: public static String upperFirst(String input) {
          if (input == null) {
              throw new IllegalArgumentException("input can't be null");
          }
          return head(input).map(String::toUpperCase).map(h -> tail(input).map(t -> h + t).orElse(h)).get();
      }
docs: Converts the first character of string to upper case.
  
  @param input The string to convert.
  @return Returns the converted string.