Permalink
Browse files

changed the run comment to "start the REPL"

  • Loading branch information...
1 parent 0a97ae7 commit 04c2b18d0300bf13f2c9e7a5d21d95c8b2623748 Lutz Hankewitz committed Jan 23, 2012
View
2 chap04/extra/QuickSort.scala
@@ -1,4 +1,4 @@
-// Start scala and run via> :load QuickSort.scala
+// Start the scala REPL and run via> :load QuickSort.scala
def sort(xs: List[Int]): List[Int] = xs match {
case Nil => xs
View
5 chap04/extra/test/Coerce.scala
@@ -1,9 +1,11 @@
-// Start scala and run via> :load Coerce.scala
+// Start the scala REPL and run via> :load Coerce.scala
+// First order coercible
trait FOCoercible[-A, +B] {
def apply(a: A): B
}
+// First order bi-directional coercible
trait FOBicoercible[A, B] extends FOCoercible[A, B] {
def unapply(b: B): A
}
@@ -20,6 +22,7 @@ implicit def foidentityCoercion[A]: FOBicoercible[A, A] = new FOBicoercible[A, A
}
+// Higher order
trait HOCoercible[-AA[_], +BB[_]] {
def apply[A, B](a: AA[A])(implicit fo: FOCoercible[A, B]): BB[B]
}
View
2 chap04/extra/test/HigherKind.scala
@@ -1,4 +1,4 @@
-// Start scala and run via> :load HigherKind.scala
+// Start the scala REPL and run via> :load HigherKind.scala
//List("1", "2", "3").coerce[Set[Int]]
View
2 chap04/extra/test/HigherKind1.scala
@@ -1,4 +1,4 @@
-// Start scala and run via> :load HigherKind1.scala
+// Start the scala REPL and run via> :load HigherKind1.scala
trait TypeConverter[-A, +B] {
def apply(a: A): B

0 comments on commit 04c2b18

Please sign in to comment.