11/29/2018, 10:44 AM
Hi All, does any of you know of an elegant way to check for functions equality in Kotlin? I’m looking for a way to check if a function created with certain set of captured values can be verified as equal to same function created with a different but structurally equal set of captured values. Any Ideas?

Andreas Sinz

11/29/2018, 10:48 AM
that sounds like an XY problem, what are you trying to achieve?


11/29/2018, 5:17 PM
I’m trying to use data classes with such functions as one of the values as a key in a Set, to avoid creating duplicated instances. I need to apply combinators on a set of functions created as per an externally defined directed graph which is allowed to have cycles. Vertices -> Functions, Edges -> Combinators. cycles will obviously cause recursive function generation, I would like to avoid that.