Pol Dellaiera
Pol Dellaiera
Hi, Is [this](https://loophp-collection.readthedocs.io/en/latest/pages/api.html#associate) what you're looking for?
This specific operation is indeed not very optimal because it needs to go through the whole iterator.
I guess it's because you can only pass an object to `IteratorIterator`, and not an `array`. > "Argument 1 passed to IteratorIterator::__construct() must implement interface Traversable, array given"
Fair enough, didn't see that part when I wrote the comment. Ignore my feedback then :-)
> I encountered the above trying to implement a lazy unzip. For reference, see: https://gist.github.com/CMCDragonkai/2ad2359a961ff13c82327da2fea0b9d8 I implemented a lazy [Zip](https://github.com/loophp/collection/blob/master/src/Operation/Zip.php)/[Unzip](https://github.com/loophp/collection/blob/master/src/Operation/Unzip.php) as well: ```php $c = Collection::fromIterable([1, 2]) ->zip([3, 4]); print_r($c->all());...
I implemented Cycle using InfiniteIterator, see: https://github.com/loophp/collection/blob/master/src/Operation/Cycle.php
Hi, I wouldn't commit this as this doesn't take in account arrays of Objects. Thx
@cweagans Travis tests passed, can we merge this now ? Thanks!
I wrote an email to Cameron, I hope we'll get an answer very soon.
Hi all, I got a reply from @cweagans , he's going to take care of this next week and Drupalcon ! Thanks in advance!