Given this code:
def getFunc(funcName:String, param:Int) = match funcName {
case "FooFunc" => FooFunc(param)
[...]
}
def FooFunc(param:Int) = param + SomeObject.SomeVariable
How could I return FooFunc
with param
applied, without evaluating it? The reason I'd want to do this is because FooFunc
, as you can see, relies on an external variable so I'd like to be able to call it with param
already applied. What would the return type of getFunc
need to be?