Scala Learning(2): map, flatMap, filter与For表达式_flink filter() scala-CSDN博客

网站介绍:文章浏览阅读4.5k次。本文叙述Collections里最常见的三种操作map, flatMap, filter,与For表达式的关系。List对三种方法的实现map在List的实现:abstract class List[+T] { def map[U](f: T => U): List[U] = this match { case x :: xs => f(x) :: xs.map(f) case_flink filter() scala