File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/scala/scalatutorial/sections Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ object TypeClasses extends ScalaTutorialSection {
5252 *
5353 * {{{
5454 * def insertionSort[T](xs: List[T])(lessThan: (T, T) => Boolean) = {
55- * def insert(y: Int , ys: List[Int ]): List[Int ] =
55+ * def insert(y: T , ys: List[T ]): List[T ] =
5656 * ys match {
5757 * …
5858 * case z :: zs =>
@@ -99,7 +99,7 @@ object TypeClasses extends ScalaTutorialSection {
9999 *
100100 * {{{
101101 * def insertionSort[T](xs: List[T])(ord: Ordering[T]): List[T] = {
102- * def insert(y: Int , ys: List[Int ]): List[Int ] =
102+ * def insert(y: T , ys: List[T ]): List[T ] =
103103 * … if (ord.lt(y, z)) …
104104 *
105105 * … insert(y, insertionSort(ys)(ord)) …
@@ -127,7 +127,7 @@ object TypeClasses extends ScalaTutorialSection {
127127 *
128128 * {{{
129129 * def insertionSort[T](xs: List[T])(implicit ord: Ordering[T]): List[T] = {
130- * def insert(y: Int , ys: List[Int ]): List[Int ] =
130+ * def insert(y: T , ys: List[T ]): List[T ] =
131131 * … if (ord.lt(y, z)) …
132132 *
133133 * … insert(y, insertionSort(ys)) …
You can’t perform that action at this time.
0 commit comments