Any way to compare two lambdas to determine if the...
# kotlin-native
b
Any way to compare two lambdas to determine if they're equal (when they have been constructed separately with the same builder)
p
Run them with the same arguments and check their outputs?
p
Rather than constructing a lambda you could construct a (private) data class that extends the appropriate function interface, and captures the required arguments for equality: https://pl.kotl.in/juj0ZQtu8
p
Or use a function and pass a method reference
308 Views