Implicit arguments in fuction literal

Is it possible to annotate any function literal argument as implicit while there are many function literal arguments.
As example

def  sample(data:Data)(f: (Int,AType) => NewType):NewType = {
   f(data.x,data.y)
}

sample(data){
 (x:Int, implicit y:AType) =>

   ???

}

It could have been really very productive.

A somewhat common workaround would be:

def sample(data:Data)(f: Int => (AType => NewType)):NewType = {
   f(data.x)(data.y)
}

sample(data) { x =>
 implicit y: AType =>
   ???
}
2 Likes

Thanks a lot.

1 Like