On Fri, 2016-06-24 at 05:26, Rafael Fourquet <fourquet.raf...@gmail.com> wrote:
>> My recollection is that part of the indexing interface in Julia (just by
>> convention) is that indexing should be of O(1) (or close to that)
>> complexity.
>
> As the OP suggested, this could still be the case, the zip object
> would simply forward the indexing to the zipped collections, which
> would fail if one of then is not indexable (in O(1)). Alternatively
> there could be a trait for that.
> I've also wanted that for a long time, and even setindex!, to be able
> to sort an array2 according to the order defined in array1:
> sort!(zip(array1, array2)).

Yes, you're right.

Reply via email to