Permalink
Browse files

touchdown. eliminated redundancy in either calc with combinewith usag…

…e. a nice and fast kata to chew on. the hashcode / equals implementation is key on value object. still wondering why alex and christian chose this kata to show mspec.
  • Loading branch information...
1 parent 2d9861f commit ed7a1a2212bd6b91590008f110258365cb0d6805 @ilkerde committed Jan 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 KataProbability.MSpec/src/Probability.cs
@@ -17,7 +17,7 @@ public class Probability : IEquatable<Probability> {
}
public Probability Either(Probability other) {
- return new Probability(value + other.value - (value * other.value));
+ return new Probability(value + other.value - CombineWith(other).value);
}
public override int GetHashCode() {

0 comments on commit ed7a1a2

Please sign in to comment.