How can I define an anonymous generic Scala function?
may help you . To summarize from that answer: No, you can't make anonymous
functions generic, but you can explicitly define your function as a class
that extends one of the Function0, Function1, Function2, etc.. traits and
define the apply function f
Date : January 02 2021, 06:48 AM , By : user3860728