Luke06/22/2022, 2:50 PM
, which works, but I would prefer to call a method instead of
val getId: (MyClass) -> String? = MyClass.somePath.id::getOrNull
to return a lambda directly so I don't have to explicit the variable type.
simon.vergauwen06/22/2022, 4:17 PM
in their APIs. https://arrow-kt.io/docs/apidocs/arrow-optics/arrow.optics/-p-lens/index.html
Luke06/22/2022, 5:32 PM
generates a function to modify the source right? I want to generate a function to get the value in the source
simon.vergauwen06/23/2022, 6:54 AM
. I'm not sure what you mean with
. Is it not simply returning
to explicit the variable type
(MyClass) -> String?
Luke06/23/2022, 2:04 PM
. I just assumed I couldn't use it as a lambda but I guess I can. Thanks for the help