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) } }
原文地址:https://www.cnblogs.com/sunrunzhi/p/9996781.html
时间: 2024-09-30 19:20:43