We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 48cc4b0 + 762726c commit 575e192Copy full SHA for 575e192
src/main/scala/catslib/Semigroup.scala
@@ -5,10 +5,9 @@
5
6
package catslib
7
8
+import cats.kernel.Semigroup
9
import org.scalatest._
10
-import cats._
11
-
12
/** A semigroup for some given type A has a single operation
13
* (which we will call `combine`), which takes two values of type A, and
14
* returns a value of type A. This operation must be guaranteed to be
@@ -59,13 +58,8 @@ object SemigroupSection
59
58
def semigroupCombineComplex(res0: Int) = {
60
import cats.implicits._
61
62
- Semigroup[Int ⇒ Int]
63
- .combine({ (x: Int) ⇒
64
- x + 1
65
- }, { (x: Int) ⇒
66
- x * 10
67
- })
68
- .apply(6) should be(res0)
+ Semigroup[Int => Int].combine(_ + 1, _ * 10).apply(6) should be(res0)
+
69
}
70
71
/** Many of these types have methods defined directly on them,
0 commit comments