标签:lis nal while 编程 scala cal lin nil obj
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) } }
Scala实战高手****第14课Scala集合上的函数式编程实战及Spark源码鉴赏
标签:lis nal while 编程 scala cal lin nil obj
原文地址:https://www.cnblogs.com/sunrunzhi/p/9996781.html