flatMap 需要一个处理嵌套列表的函数,然后将结果串连起来。 scala> val nestedNumbers = List(List(1, 2), List(3, 4)) nestedNumbers: List[List[Int]] = ...
確定! 回上一頁