Skip to content

Commit 575e192

Browse files
authored
Merge pull request #66 from Kobenko/master
Omit explicit parameter types of anonymous functions
2 parents 48cc4b0 + 762726c commit 575e192

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/main/scala/catslib/Semigroup.scala

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55

66
package catslib
77

8+
import cats.kernel.Semigroup
89
import org.scalatest._
910

10-
import cats._
11-
1211
/** A semigroup for some given type A has a single operation
1312
* (which we will call `combine`), which takes two values of type A, and
1413
* returns a value of type A. This operation must be guaranteed to be
@@ -59,13 +58,8 @@ object SemigroupSection
5958
def semigroupCombineComplex(res0: Int) = {
6059
import cats.implicits._
6160

62-
Semigroup[Int Int]
63-
.combine({ (x: Int)
64-
x + 1
65-
}, { (x: Int)
66-
x * 10
67-
})
68-
.apply(6) should be(res0)
61+
Semigroup[Int => Int].combine(_ + 1, _ * 10).apply(6) should be(res0)
62+
6963
}
7064

7165
/** Many of these types have methods defined directly on them,

0 commit comments

Comments
 (0)