ceylon/ceylon.language — pull request #472 by lucaswerkmeister (2014-06-03 22:35:29+00:00)
Title: Fix sequential() implementation again

My previous fix from #471 was flawed because it would have broken if `ArraySequence()` had evaluated the internal `notempty` iterable more than once. This version corrects that: Each `iterator()` on the internal `notempty` iterable will evaluate the original `iterable`’s elements exactly once.

(Note: it seems that `ArraySequence` was actually okay. See comment below.)

I’m not sure if we need the test commit. It was useful to verify that I implemented `sequential` correctly, but now it’s basically worthless because it copies the implementation instead of using it – when you change `sequential()`, the test doesn’t help you at all. I can remove the commit if you want.