Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

changed the run comment to "start the REPL"

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

0 comments on commit 04c2b18

Please sign in to comment.
Something went wrong with that request. Please try again.