31. $ sbt
[info] Set current project to default-ee3801 (in build /sample/)
32. $ sbt
[info] Set current project to default-ee3801 (in build /sample/)
$ scala-version
[info] 2.8.1
33. $ sbt
[info] Set current project to default-ee3801 (in build /sample/)
$ scala-version
[info] 2.8.1
$ console
Welcome to Scala version 2.8.1 (Java HotSpot(TM) Client VM, Java 1.6.0_26).
Type in expressions to have them evaluated.
Type :help for more information.
scala>
34. $ sbt
[info] Set current project to default-ee3801 (in build /sample/)
$ scala-version
[info] 2.8.1
$ console
Welcome to Scala version 2.8.1 (Java HotSpot(TM) Client VM, Java 1.6.0_26).
Type in expressions to have them evaluated.
Type :help for more information.
scala> List(1,2,3).par
<console>:6: error: value par is not a member of List[Int]
List(1,2,3).par
^
scala>
35. $ sbt
[info] Set current project to default-ee3801 (in build /sample/)
$ scala-version
[info] 2.8.1
$ console
Welcome to Scala version 2.8.1 (Java HotSpot(TM) Client VM, Java 1.6.0_26).
Type in expressions to have them evaluated.
Type :help for more information.
scala> List(1,2,3).par
<console>:6: error: value par is not a member of List[Int]
List(1,2,3).par
^
scala> :q
>
36. $ sbt
[info] Set current project to default-ee3801 (in build /sample/)
$ scala-version
[info] 2.8.1
$ console
Welcome to Scala version 2.8.1 (Java HotSpot(TM) Client VM, Java 1.6.0_26).
Type in expressions to have them evaluated.
Type :help for more information.
scala> List(1,2,3).par
<console>:6: error: value par is not a member of List[Int]
List(1,2,3).par
^
scala> :q
> set scalaVersion := "2.9.0-1"
>
37. $ sbt
[info] Set current project to default-ee3801 (in build /sample/)
$ scala-version
[info] 2.8.1
$ console
Welcome to Scala version 2.8.1 (Java HotSpot(TM) Client VM, Java 1.6.0_26).
Type in expressions to have them evaluated.
Type :help for more information.
scala> List(1,2,3).par
<console>:6: error: value par is not a member of List[Int]
List(1,2,3).par
^
scala> :q
> set scalaVersion := "2.9.0-1"
> console
Welcome to Scala version 2.9.0-1 (Java HotSpot(TM) Client VM, Java 1.6.0_26).
Type in expressions to have them evaluated.
Type :help for more information.
scala>
38. $ sbt
[info] Set current project to default-ee3801 (in build /sample/)
$ scala-version
[info] 2.8.1
$ console
Welcome to Scala version 2.8.1 (Java HotSpot(TM) Client VM, Java 1.6.0_26).
Type in expressions to have them evaluated.
Type :help for more information.
scala> List(1,2,3).par
<console>:6: error: value par is not a member of List[Int]
List(1,2,3).par
^
scala> :q
> set scalaVersion := "2.9.0-1"
> console
Welcome to Scala version 2.9.0-1 (Java HotSpot(TM) Client VM, Java 1.6.0_26).
Type in expressions to have them evaluated.
Type :help for more information.
scala> List(1,2,3).par
res0: scala.collection.parallel.immutable.ParSeq[Int] = ParVector(1, 2, 3)
42. 依存ライブラリの追加も超簡単
> set libraryDependencies += "org.scala-tools.time" %% "time" % "0.4"
> console
Welcome to Scala version 2.9.0.final (Java HotSpot(TM) 64-Bit Server VM,
Java 1.6.0_26).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import org.scala_tools.time.Imports._
import org.scala_tools.time.Imports._
scala> DateTime.now + 1.days
97. <<=
The most general method is <<=. All other methods can be
implemented in terms of <<=. <<= defines a setting using
other settings
もっとも一般的なメソッドで、他のすべてのメソッドはこれを使って
実装することができる
100. :=
:= is used to define a setting that overwrites any
previous value without referring to other settings.
:= は、他の設定値を参照せずに、値を上書きする場合
name := "My Project"
101. +=
+= is used to define a setting that will append a single
value to the current sequence without referring to other
settings.
他の設定値を参照せずに、Seq型のSettingに対して、値を
一つ追加する場合
103. ++=
The related method ++= appends a sequence to the current
sequence, also without using other settings
(+=に関連する) ++= というメソッドは、現在のSequence に
Sequence を追加する。これもまた(+=と同じように)他の設
定値は参照しない
109. <++=
This next example adds a dependency on
the Scala compiler to the current list of
dependencies. Because another setting
(scalaVersion) is used and a Seq is
appended, the method is <++=.