From 2bb52cf977e1baf9366b56c39354aaf194635054 Mon Sep 17 00:00:00 2001 From: Marissa Date: Mon, 18 Sep 2023 07:55:56 -0400 Subject: [PATCH] fixup! fixup! fixup! fixup! fixup! fixup! Stop old `#::` from being called examples and fix mistake --- .../scala-2.13+/cats/data/NonEmptyLazyList.scala | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/src/main/scala-2.13+/cats/data/NonEmptyLazyList.scala b/core/src/main/scala-2.13+/cats/data/NonEmptyLazyList.scala index 3b5096b7d2..4d729bfc2e 100644 --- a/core/src/main/scala-2.13+/cats/data/NonEmptyLazyList.scala +++ b/core/src/main/scala-2.13+/cats/data/NonEmptyLazyList.scala @@ -85,6 +85,11 @@ object NonEmptyLazyList extends NonEmptyLazyListInstances { * Wraps a `LazyList` to be used as the tail of a `NonEmptyLazyList`, * so that individual elements or `NonEmptyLazyList`s can be prepended to it * to construct a non-empty result without evaluating any elements. + * + * @example + * {{{ + * val nell: NonEmptyLazyList[Int] = 4 #:: NonEmptyLazyList.tail(LazyList.from(5)) + * }}} */ def tail[A](ll: => LazyList[A]): Tail[A] = new Tail(LazyList.empty #::: ll) @@ -92,6 +97,11 @@ object NonEmptyLazyList extends NonEmptyLazyListInstances { * A wrapped empty `LazyList` to be used as the tail of a `NonEmptyLazyList`, * so that individual elements or `NonEmptyLazyList`s can be prepended to it * to construct a non-empty result without evaluating any elements. + * + * @example + * {{{ + * val nell: NonEmptyLazyList[Int] = 4 #:: NonEmptyLazyList.emptyTail + * }}} */ def emptyTail[A]: Tail[A] = new Tail(LazyList.empty) @@ -107,7 +117,7 @@ object NonEmptyLazyList extends NonEmptyLazyListInstances { create(elem #:: ll) /** Prepends a `NonEmptyLazyList`, yielding a `NonEmptyLazyList`. */ - def #:::[AA >: A](prefix: => NonEmptyLazyList[AA])(implicit d: DummyImplicit): NonEmptyLazyList[AA] = + def #:::[AA >: A](prefix: => NonEmptyLazyList[AA]): NonEmptyLazyList[AA] = create(LazyList.empty #::: prefix.toLazyList #::: ll) }