Colton Idle
08/17/2020, 7:36 PMstatic Function1<MyManager, String> doTheManaging(){
return MyManager::condense;
}
The kotlin converter can't seem to convert this. Can anyone point me in the right direction?
Converter gives me a new companion object
then
fun doTheManaging(): Function1<MyManager, String> {
return { valueMap: Map<String, Any> -> condense(valueMap)}
}
but the entire return statement is rednanodeath
08/17/2020, 8:34 PMFunction1<MyManager, String>
right after the return
nanodeath
08/17/2020, 8:34 PMnanodeath
08/17/2020, 8:35 PM(MyManager) -> String
instead.Colton Idle
08/17/2020, 9:04 PMfun doTheManaging(): Function1<MyManager, String> {
return { valueMap: MyManager -> valueMap.condense()}
}
nanodeath
08/17/2020, 9:06 PMcondense()
returns a String...should work. what is Function1 exactly?Colton Idle
08/17/2020, 9:06 PMColton Idle
08/17/2020, 9:06 PMnanodeath
08/17/2020, 9:07 PMfun doTheManaging(valueMap: MyManager): String = valueMap.condense()
and then use a method referencenanodeath
08/17/2020, 9:08 PMfun doTheManaging(): (MyManager) -> String =
{ valueMap: MyManager -> valueMap.condense }
should also do it, but...it admittedly a little weirder.Colton Idle
08/17/2020, 9:10 PMnanodeath
08/17/2020, 9:11 PM