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

Change format of NonEmptyVector.show #1203

Merged
merged 2 commits into from
Jul 16, 2016

Conversation

ceedubs
Copy link
Contributor

@ceedubs ceedubs commented Jul 15, 2016

This follows up on several small suggestions from comments in #1137. The
only meaningful modification is changing the format of show from
something like NonEmptyVector(Vector(1, 2, 3)) to something like
NonEmptyVector(1, 2, 3).

I've also added a length method to NonEmptyVector.

This follows up on several small suggestions from comments in typelevel#1137. The
only meaningful modification is changing the format of `show` from
something like `NonEmptyVector(Vector(1, 2, 3))` to something like
`NonEmptyVector(1, 2, 3)`.

I've also added a `length` method to `NonEmptyVector`.
@johnynek
Copy link
Contributor

👍

@@ -138,7 +144,7 @@ private[data] sealed trait NonEmptyVectorInstances {

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

override def size[A](fa: NonEmptyVector[A]): Long = 1 + fa.tail.size.toLong
override def size[A](fa: NonEmptyVector[A]): Long = fa.length.toLong
Copy link
Contributor

@kailuowang kailuowang Jul 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch there.

@kailuowang
Copy link
Contributor

👍 LGTM pending the tut fix.

@non
Copy link
Contributor

non commented Jul 15, 2016

👍

@codecov-io
Copy link

codecov-io commented Jul 15, 2016

Current coverage is 89.20%

Merging #1203 into master will increase coverage by 0.04%

@@             master      #1203   diff @@
==========================================
  Files           234        234          
  Lines          3137       3141     +4   
  Methods        3083       3084     +1   
  Messages          0          0          
  Branches         52         55     +3   
==========================================
+ Hits           2797       2802     +5   
+ Misses          340        339     -1   
  Partials          0          0          

Sunburst

Powered by Codecov. Last updated by 5455ff1...ed88a6d

@peterneyens
Copy link
Collaborator

👍

@peterneyens peterneyens merged commit 4f7b79a into typelevel:master Jul 16, 2016
@stew stew removed the in progress label Jul 16, 2016
@ceedubs ceedubs deleted the nev-followup branch July 16, 2016 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants