Scala实战高手****第14课:Scala集合上的函数式编程实战及Spark源码鉴赏
package com.dt.spark.scala.bascis object Functional_Itearal { def main(args: Array[String]): Unit = { val range = 1 to 10 val list = List(1,2,3,4,5) println(list.head) println(list.tail) println(list.tail) println(0::list) var linkedList = scala.collection.mutable.LinkedList(1,2,3,4,5) println(linkedList.elem) println(linkedList.tail) while(linkedList != Nil){ println(linkedList.elem) linkedList = linkedList.tail } println(linkedList) } }