scala学习笔记:理解stream和view
摘要:
先来个正常的:scala> (0 to 5).map((x:Int)=>{println(x);x*2}).foreach(println)0123450246810再来个stream版的:scala> (0 to 5).toStream.map((x:Int)=>{println(... 阅读全文
posted @ 2015-03-01 22:54 白乔 阅读(424) 评论(1) 推荐(0) 编辑