Terry's blog

Focus on bigdata and cloud.

博客园 首页 新随笔 联系 订阅 管理

2018年8月8日 #

摘要: 1. map函数 对集合的每一个元素运用某个函数操作,然后将结果作为一个新的列表返回。 实例1:将列表中每个元素值乘以2 scala> val list1=List(1,2,3,4) list1: List[Int] = List(1, 2, 3, 4) scala> list1.map(_*2) 阅读全文
posted @ 2018-08-08 20:34 王晓成 阅读(769) 评论(0) 推荐(0) 编辑