scala学习笔记:理解lazy值
摘要:
scala> var counter = 0counter: Int = 0scala> def foo = {counter += 1; counter}foo: Intscala> val value1 = foo; lazy val value2 = foo; def valu... 阅读全文
posted @ 2015-02-08 18:44 白乔 阅读(144) 评论(0) 推荐(0) 编辑
posted @ 2015-02-08 18:44 白乔 阅读(144) 评论(0) 推荐(0) 编辑