blegh, is there an equatable lazy in kotlin?
# announcements
g
blegh, is there an equatable lazy in kotlin?
m
groostav: Not sure what you mean. I found nothing when I searched for "equatable lazy". I guess that you mean something like:
Copy code
lazy val a = getValOfA()
If so then there is no such thing. There is only lazy basing on property delegation:
Copy code
val a by lazy { getValOfA() }
But the result is nearly the same
g
what I want is a lazy that performs equals on its value, ie
lazy { 42 } == lazy { 42 }
currently returns
false