File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
scala-design-patterns/src/main/scala/com/baeldung/scala/magnetpattern
scala-sbt/sbt-info/project Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ lazy val scala_core_7 = (project in file("scala-core-modules/scala-core-7"))
9595 name := " scala-core-7" ,
9696 scalaVersion := scala3Version,
9797 libraryDependencies ++= scalaTestDeps,
98- libraryDependencies += jUnitInterface,
98+ libraryDependencies += jUnitInterface
9999 )
100100
101101lazy val scala_core_8 = (project in file(" scala-core-modules/scala-core-8" ))
Original file line number Diff line number Diff line change @@ -22,11 +22,15 @@ object MagnetPattern extends App {
2222
2323 def combineElements (magnet : CombineMagnet ): magnet.Result = magnet()
2424
25- implicit def intCombineMagnet (intList : List [Int ]): CombineMagnet {type Result = Int } = new CombineMagnet {
25+ implicit def intCombineMagnet (
26+ intList : List [Int ]
27+ ): CombineMagnet { type Result = Int } = new CombineMagnet {
2628 override type Result = Int
2729 override def apply (): Result = intList.reduce((i, c) => i + c)
2830 }
29- implicit def strCombineMagnet (stringList : List [String ]): CombineMagnet {type Result = String } = new CombineMagnet {
31+ implicit def strCombineMagnet (
32+ stringList : List [String ]
33+ ): CombineMagnet { type Result = String } = new CombineMagnet {
3034 override type Result = String
3135 override def apply (): Result = stringList.reduce((s, c) => s.concat(c))
3236 }
Original file line number Diff line number Diff line change 11addSbtPlugin(" com.eed3si9n" % " sbt-buildinfo" % " 0.10.0" )
22
33addSbtPlugin(" org.scoverage" % " sbt-scoverage" % " 2.0.8" )
4-
You can’t perform that action at this time.
0 commit comments