@@ -18,10 +18,10 @@ case class Summary(pots: Potentials, effs: Effects) {
18
18
Summary (pots ++ summary2.pots, this .effs ++ summary2.effs)
19
19
20
20
def + (pot : Potential ): Summary =
21
- Summary (pots + pot, effs)
21
+ Summary (pots : + pot, effs)
22
22
23
23
def + (eff : Effect ): Summary =
24
- Summary (pots, effs + eff)
24
+ Summary (pots, effs : + eff)
25
25
26
26
def dropPotentials : Summary =
27
27
Summary (Potentials .empty, effs)
@@ -44,14 +44,14 @@ case class Summary(pots: Potentials, effs: Effects) {
44
44
object Summary {
45
45
val empty : Summary = Summary (Potentials .empty, Effects .empty)
46
46
47
- def apply (pots : Potentials ): Summary = new Summary (pots, Effects .empty)
47
+ def apply (pots : Potentials ): Summary = empty ++ pots
48
48
49
49
@ targetName(" withEffects" )
50
- def apply (effs : Effects ): Summary = new Summary ( Potentials . empty, effs)
50
+ def apply (effs : Effects ): Summary = empty ++ effs
51
51
52
- def apply (pot : Potential ): Summary = new Summary ( Potentials . empty + pot, Effects .empty)
52
+ def apply (pot : Potential ): Summary = empty + pot
53
53
54
- def apply (eff : Effect ): Summary = new Summary ( Potentials . empty, Effects .empty + eff)
54
+ def apply (eff : Effect ): Summary = empty + eff
55
55
}
56
56
57
57
/** Summary of class.
0 commit comments