Skip to content

Commit

Permalink
Optimize toNonEmptyList of Reducible[NonEmptyChain] (#3528)
Browse files Browse the repository at this point in the history
  • Loading branch information
takayahilton authored Jul 25, 2020
1 parent aac643f commit aa7a8fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/main/scala/cats/data/NonEmptyChain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ sealed abstract private[data] class NonEmptyChainInstances extends NonEmptyChain

override def alignWith[A, B, C](fa: NonEmptyChain[A], fb: NonEmptyChain[B])(f: Ior[A, B] => C): NonEmptyChain[C] =
alignInstance.alignWith(fa, fb)(f)

override def toNonEmptyList[A](fa: NonEmptyChain[A]): NonEmptyList[A] = fa.toNonEmptyList
}

implicit def catsDataOrderForNonEmptyChain[A: Order]: Order[NonEmptyChain[A]] =
Expand Down

0 comments on commit aa7a8fe

Please sign in to comment.