Any suggestions how i can compare two lambdas? e.g...
# javascript
b
Any suggestions how i can compare two lambdas? e.g. how I can get
x == y -> true
haviing
Copy code
val x = {null}
val y = {null}
t
Copy code
val Any.body:String
    get() = toString().substringAfter("{")

fun main() {
    val a = { null }
    val b = { null }
    val c = { 13 }
    println(a.body == b.body)
    println(a.body == c.body)
}
On playground
b
Would this work on non-js platform?
t
Depends on platform 🙂