How to implement this function below
public T myFunction(Function<T> func) //T is the return type
{
//...some code
return func();
}
And I can use the function like below, and don't need to declare parameters a, b, c in myFunction
myType result = myFunction(() -> doSomething(a, b , c))