When using lambda function variable, is there an alternative to invoking function with apply. 
Function<String, String> mesgFunction =  (name) -> "Property "+ name +" is not set in the environment";
Optional.ofNullable(System.getProperty("A")).orElseThrow(() -> new IllegalArgumentException(mesgFunction.apply("A")));
Optional.ofNullable(System.getProperty("B")).orElseThrow(() -> new IllegalArgumentException(mesgFunction.apply("B")));
Is there a shorter syntax to mesgFunction.apply("A"). I tried mesgFunction("A") which complained that the method does not exist. Am I missing something? Isn't there a shorter alternative? 


->in theprintlnmethod directly?