Closed julienrf closed 6 years ago
Oh, I just wondered why my commit showed up in this branch but it doesn't. We both did the same change (https://github.com/scala/collection-strawman/commit/ec281081cb0cd8753ba8a6b1efa1cb29fc29a5b3)
Oops, I pushed --force
We could even consider making this the default implementation of mkString
in IterableOps
and overriding it with the current default implementation in StrictOptimizedIterableOps
. This would be more consistent with other default implementations where the lazy version is in IterableOps
We could maybe do it in SeqOps
or LinearSeqOps
(because it relies on head
and tail
). But I think that’s out of the scope of this PR.
Right, you'd need at least a LinearSeq
for proper head/tail destructuring. Iterators couldn't express the headDefined
/tailDefined
semantics.
Fixes scala/collection-strawman#376 Fixes scala/collection-strawman#420
This is a rebased and squashed version of #446 (authored by @dhanesharole).