Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename concatNEV for consistency with e.g. toNel #1264

Merged
merged 1 commit into from
Aug 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/src/main/scala/cats/data/NonEmptyVector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ final class NonEmptyVector[A] private (val toVector: Vector[A]) extends AnyVal {
/**
* Append another `NonEmptyVector` to this, producing a new `NonEmptyVector`.
*/
def concatNEV(other: NonEmptyVector[A]): NonEmptyVector[A] = new NonEmptyVector(toVector ++ other.toVector)
def concatNev(other: NonEmptyVector[A]): NonEmptyVector[A] = new NonEmptyVector(toVector ++ other.toVector)

/**
* Find the first element matching the predicate, if one exists
Expand Down Expand Up @@ -140,7 +140,7 @@ private[data] sealed trait NonEmptyVectorInstances {
with Comonad[NonEmptyVector] with Traverse[NonEmptyVector] with MonadRec[NonEmptyVector] {

def combineK[A](a: NonEmptyVector[A], b: NonEmptyVector[A]): NonEmptyVector[A] =
a concatNEV b
a concatNev b

override def split[A](fa: NonEmptyVector[A]): (A, Vector[A]) = (fa.head, fa.tail)

Expand Down
4 changes: 2 additions & 2 deletions tests/src/test/scala/cats/tests/NonEmptyVectorTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ class NonEmptyVectorTests extends CatsSuite {
}
}

test("++ Vector is consistent with concatNEV") {
test("++ Vector is consistent with concatNev") {
forAll { (nonEmptyVector: NonEmptyVector[Int], other: NonEmptyVector[Int]) =>
nonEmptyVector ++ other.toVector should === (nonEmptyVector.concatNEV(other))
nonEmptyVector ++ other.toVector should === (nonEmptyVector.concatNev(other))
}
}

Expand Down