Skip to content

Commit

Permalink
Merge pull request #1027 from ceedubs/traverse-doc-nel-semigroup
Browse files Browse the repository at this point in the history
Remove unnecessary nelSemigroup from traverse doc
  • Loading branch information
adelbertc committed May 11, 2016
2 parents c7498e4 + cc06696 commit a1bf196
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions docs/src/main/tut/traverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,7 @@ Examples.
val x1 = List("1", "2", "3").traverseU(parseIntXor)
val x2 = List("1", "abc", "3").traverseU(parseIntXor)
val x3 = List("1", "abc", "def").traverseU(parseIntXor)
```

We need proof that `NonEmptyList[A]` is a `Semigroup `for there to be an `Applicative` instance for
`ValidatedNel`.
```tut:silent
implicit def nelSemigroup[A]: Semigroup[NonEmptyList[A]] =
OneAnd.oneAndSemigroupK[List].algebra[A]
```

Thus.

```tut
val v1 = List("1", "2", "3").traverseU(parseIntValidated)
val v2 = List("1", "abc", "3").traverseU(parseIntValidated)
val v3 = List("1", "abc", "def").traverseU(parseIntValidated)
Expand Down

0 comments on commit a1bf196

Please sign in to comment.