scalaz/scalaz — pull request #355 by oxbowlakes (2013-05-03 14:29:27+00:00)
Title: Semigroups for minval and maxval for an Ordered type

Any Ordered type `A` gives rise to two `Semigroups` (implicitly available from the `Order` module):

```scala
Semigroup[A @@ MinVal]
Semigroup[A @@ MaxVal]
```

Examples:

```scala
forall[A : Order] (nel: NonEmptyList[A]) => (nel map MinVal).suml1 === nel.minimum1
forall[A : Order] (nel: NonEmptyList[A]) => (nel map MaxVal).suml1 === nel.maximum1
```