大数据Spark “蘑菇云”行动前传第22课:Scala集合和高级函数操作实战及Spark源码鉴赏. 1 及Spark源码集合和高级函数鉴赏. 2 Scala集合和高级函数操作实战
Microsoft Windows [版本 6.1.7601] (C) 版权所有 1985-2003 Microsoft Corp.
C:\Users\admin\Desktop>scala Welcome to Scala version 2.10.4 (Java HotSpot(TM) Client VM, Java 1.8.0_65). Type in expressions to have them evaluated. Type :help for more information.
scala> (1 to 10) res0: scala.collection.immutable.Range.Inclusive = Range(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
scala> (1 to 10).re :8: error: value re is not a member of scala.collection.immutable.Range .Inclusive (1 to 10).re ^
scala> (1 to 10).re:1: error: ';' expected but ')' found. 10) ^
res2: scala.collection.immutable.Range.Inclusive = Range(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)