SOLVED: Type mismatch with generic function: why?


#1

Hello I have the following error:

[error] ParamSearch.scala:618: type mismatch;
[error]  found   : (algorithm.Train, algorithm.Test, algorithm.Args) => Either[ADWError,Metrics[_, _, _]]
[error]     (which expands to)  (algorithm.Train, algorithm.Test, A#Arguments) => Either[ADWError,Metrics[_, _, _]]
[error]  required: ? => ?
[error]         val experiment = ParamSelect.execFunc(numThreads, timeOut, logFile, func ) _
[error]                                                                             ^
[info] (algorithm.Train, algorithm.Test, algorithm.Args) => Either[ADWError,Metrics[_, _, _]] <: ? => ??
[info] false```

and my execFunc has the following signature:

def execFunc[S,T](parallelism: Int, duration: Duration, results: PrintWriter, func : S => T)
(data: Stream[S])
(implicit s: Scheduler): Either[ADWError, FiniteDuration] = {
}

Why won't the `func` bind ?

TIA

#2

Figured it out. Have to convert the 3 parameters into a single one that is expected.