yura
yura

Reputation: 14645

Is there any usage of implicit functions with several parameters in Scala?

Implicit functions with several parameters are allowed, that is:

implicit def it(path: String, category: String):Iterator[String] = ...

But can the Scala compiler do something useful with it? If not, why doesn't it complain?

Upvotes: 14

Views: 467

Answers (1)

Daniel C. Sobral
Daniel C. Sobral

Reputation: 297155

Yes, the compiler can do something with it if you ask for such an implicit.

def f(implicit ev: (String, String) => Iterator[String]) = ...

Upvotes: 18

Related Questions