开发者

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

开发者 https://www.devze.com 2023-03-31 19:18 出处:网络
Implicit functions with several parameters are allowed, that is: implicit def it(path: String, category: String):Iterator[String] = ...

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 co开发者_高级运维mplain?


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

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

精彩评论

暂无评论...
验证码 换一张
取 消