[Challenge] implementing the ambiguous operator in D

Simen kjaeraas simen.kjaras at gmail.com
Mon Sep 6 05:39:55 PDT 2010


Peter Alexander <peter.alexander.au at gmail.com> wrote:

> I must be missing something, because I don't understand how you
> could possibly take the cross product of any number of infinite
> ranges (other than to just return the range of (a[0], b[i]) for
> all (infinitely many) i in b).
>
> Note that I'm assuming you mean cartesian product, rather than
> cross product; I've never heard cross product used in the context
> of sets.

Quite simple - the result is also an infinte range (infinitely
infinite, if you will :p ), that is lazily calculated. And yes,
Cartesian product is exactly what we're talking about.

-- 
Simen


More information about the Digitalmars-d mailing list