a method expects as argument something like `(Stri...
# announcements
t
a method expects as argument something like
(String) -> Any
. Shouldnt it be possible then, to pass
this::someMethod
if it takes a string and returns something?
g
returns something?
j
In that case you’d need to pass in a lambda, in order to capture the context of the function call (i.e.
this
)
t
::someMethod
does the job, thank you 🙂
j
What’s that syntax called? I’d like to go look up how it works.
t
in my case i set up a
mappers = mapOf("someString" to ::someMethod)
(which results in
Map<String, (String) -> Any>
)