Skip to content

Commit 8104b40

Browse files
author
Luka Jacobowitz
committed
Fix doctest
1 parent 5193dd1 commit 8104b40

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/main/scala/cats/data/NonEmptySet.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,18 @@ final class NonEmptySet[A] private (val set: SortedSet[A]) extends AnyVal {
124124

125125
def length: Int = size
126126

127+
override def toString: String = s"NonEmpty${set.toString}"
128+
127129
/**
128130
* Zips this `NonEmptySet` with another `NonEmptySet` and applies a function for each pair of elements.
129131
*
130132
* {{{
131133
* scala> import cats.data.NonEmptySet
134+
* scala> import cats.implicits._
132135
* scala> val as = NonEmptySet.of(1, 2, 3)
133136
* scala> val bs = NonEmptySet.of("A", "B", "C")
134137
* scala> as.zipWith(bs)(_ + _)
135-
* res0: cats.data.NonEmptySet[String] = NonEmptySet(1A, 2B, 3C)
138+
* res0: cats.data.NonEmptySet[String] = NonEmptyTreeSet(1A, 2B, 3C)
136139
* }}}
137140
*/
138141
def zipWith[B, C: Order](b: NonEmptySet[B])(f: (A, B) => C): NonEmptySet[C] =

0 commit comments

Comments
 (0)