Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/scala/scalatutorial/sections/TypeClasses.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ object TypeClasses extends ScalaTutorialSection {
*
* {{{
* def insertionSort[T](xs: List[T])(lessThan: (T, T) => Boolean) = {
* def insert(y: Int, ys: List[Int]): List[Int] =
* def insert(y: T, ys: List[T]): List[T] =
* ys match {
* …
* case z :: zs =>
Expand Down Expand Up @@ -99,7 +99,7 @@ object TypeClasses extends ScalaTutorialSection {
*
* {{{
* def insertionSort[T](xs: List[T])(ord: Ordering[T]): List[T] = {
* def insert(y: Int, ys: List[Int]): List[Int] =
* def insert(y: T, ys: List[T]): List[T] =
* … if (ord.lt(y, z)) …
*
* … insert(y, insertionSort(ys)(ord)) …
Expand Down Expand Up @@ -127,7 +127,7 @@ object TypeClasses extends ScalaTutorialSection {
*
* {{{
* def insertionSort[T](xs: List[T])(implicit ord: Ordering[T]): List[T] = {
* def insert(y: Int, ys: List[Int]): List[Int] =
* def insert(y: T, ys: List[T]): List[T] =
* … if (ord.lt(y, z)) …
*
* … insert(y, insertionSort(ys)) …
Expand Down