1-獲取集合長度-list.length
2-獲取集合大小-list.size
3-循環(huán)遍歷-foreach
4-迭代器-list.iterator
5-生成字符串-list.mkString(",")
6-是否包含-list.contains(3)
7-獲取集合的頭-list1.head
8-獲取集合的尾(不是頭的就是尾)-list1.tail
9-集合最后一個數(shù)據(jù)-list1.last
10-集合初始數(shù)據(jù)(不含最后一個)-list1.init
11-反轉(zhuǎn)-list1.reverse
12-取前(后) n 個元素-(right)take
13-去掉前(后) n 個元素-(right)drop
14-并集-union
15-交集-intersect
16-差集-diff
17-拉鏈-zip
18-滑窗-sliding
19-求和-sum
20-乘積-product
21-最大值-max
22-最小值-min
23-過濾-filter
24-映射-map
25-扁平化-flatten
26-映射再扁平化-flatMap
27-折疊-fold(Left/Right)
28-簡化-reduce(Left/Right)
27-分組-groupBy
28-reduce
29-排序-sort的幾個方法