playframework/Play20 — pull request #757 by jto (2013-02-19 16:24:48+00:00)
Title: Add MonoidOps and Monoid instance for A => A

Just add `MonoidOps` and an implicit conversion for it, along with an instance of `Monoid[A => A]`

With it you can do something like:

```scala
def setColour(c: String): Result => Result = _.withCookies(Cookie("colour", c))
def notif(m: String): Result => Result = _.flashing("info" -> m)

val c = setColour("red")
val n = notif("Your favorite colour has been saved")

(c |+| n).apply(Redirect("/"))
```

I don't know if `|+|` is the best choice for this operator, if anybody has a better idea, just tell me.