Join Slack
Communities
Powered by
Is it a bad practice to have lambda inside lambda?...
# announcements
f
fatih
04/16/2020, 7:27 AM
Is it a bad practice to have lambda inside lambda?
Copy code
(String) -> (() -> Unit)
Or is there any side effects?
s
Stephan Schroeder
04/16/2020, 8:43 AM
probably depends on what you're using it for, but generally I don't think so.
t
tseisel
04/16/2020, 9:08 AM
I don't think that's a bad practice, but it's harder to read and understand the intent. I'd probably use a
typealias
to give an explicit name to the inner lambda
f
fatih
04/16/2020, 9:09 AM
Thanks 👍
3
Views
Open in Slack
Previous
Next