Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
object EvaluationMonoid extends Monoid[Evaluation] {
def zero = Evaluation(0,0)
def append(x: Evaluation, y: => Evaluation) =
Evaluation(x.total + y.total, x.correct + y.correct)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment