stacycurl / pimpathon

Adds useful methods to scala & java classes.
Apache License 2.0
35 stars 9 forks source link

Add List[A].zipExact(List[B]): (List[(A, B)], List[A], List[B]) #207

Closed stacycurl closed 9 years ago

stacycurl commented 9 years ago

List(1, 2, 3).zip(List(4, 5, 6)) == (List((1, 4), (2, 5), (3, 6)), Nil, Nil) List(1).zip(List(4, 5, 6)) == (List((1, 4)), Nil, List(5, 6)) List(1, 2, 3).zip(List(4)) == (List((1, 4)), List(2, 3), Nil)

stacycurl commented 9 years ago

Signature could be List[A].zipExact(List[B]): (List[(A, B)], Option[Either[List[A], List[B]]])

stacycurl commented 9 years ago

Done in 1.4.5

fommil commented 9 years ago

huh?

fommil commented 9 years ago

aaah, three parts in response. Unmatched components.

stacycurl commented 9 years ago

Yeah, it's quite ugly, as types go.

On 25 April 2015 at 00:13, Sam Halliday notifications@github.com wrote:

aaah, three parts in response. Unmatched components.

— Reply to this email directly or view it on GitHub https://github.com/stacycurl/pimpathon/issues/207#issuecomment-96093455.

Stacy

fommil commented 9 years ago

I have lost all rights to complain about type signatures https://github.com/fommil/ensime-server/blob/jerk/jerk/src/main/scala/org/ensime/jerk/FamilyFormats.scala#L126

fommil commented 9 years ago

this one, possibly worse https://github.com/fommil/ensime-server/blob/jerk/jerk/src/main/scala/org/ensime/jerk/FamilyFormats.scala#L177