Add NonEmptyList#prependAll#4267
Conversation
|
A couple of thoughts from my side. First of all, just to note: The second thing I'd like to call out is naming. On one hand, Scala library kinda reserves Therefore, IMO to keep Cats consistent with itself, it'd be more correct to name these methods |
|
Thanks for your comments!
Added that.
Added
Renamed that. Please review again. Looking forward to your feedback! |
Baro1905
left a comment
There was a problem hiding this comment.
core/src/main/scala/cats/data/NonEmptyList.scala
|
@saeltz looks good to me, thanks for your efforts! If you believe your PR is pretty much ready, would you mind pulling it out of the "Draft" state please? |
|
Thanks for addressing all the feedback! For anyone interested, here's a thread about the origin of the method naming that Sergey pointed out we should be consistent with: #1838 (comment) After reading that I'm a bit lost in the weeds but I promise I'll circle back soon :) |
armanbilge
left a comment
There was a problem hiding this comment.
Looks good, just a couple thoughts about tests :)
armanbilge
left a comment
There was a problem hiding this comment.
Thanks for all your work on this, I know the scope expanded quite a bit from your original PR. Very much appreciated!
NonEmptyListwas missing aprependAll/++:. This adds the method and the alias and tests. The implementation may not be most efficient.I also added an override for
concatto append anOptionto aNonEmptyList. I would have usedIterableOnceas in the standard library for Scala 2.13 withSeq. But I didn't know how to do that cross-version with Scala 2.12 andTraversableOnce. Maybe I could useFoldable? Any help appreciated.