``` class Foo(val nrow:Int){ val rowNumber: Iterab...
# announcements
h
Copy code
class Foo(val nrow:Int){
val rowNumber: Iterable<Int> get() = 1..nrow

val rowNumber: Iterable<Int>  by lazy { (1..nrow) }
}
The
lazy
will cache the result in a backing field, but the first impl using
get
won’t, is this correct? If so, should I prefer
lazy
impl if the operation might be expensive and the
rowNumber
would be accessed multiple times?