Lawrence D’Oliveiro writes:
> On Thursday, March 15, 2018 at 2:56:24 PM UTC+13, Ben Bacarisse wrote:
>>
>> Lawrence D’Oliveiro writes:
>>
>>> On Wednesday, March 14, 2018 at 2:18:24 PM UTC+13, Ben Bacarisse wrote:
>>>
Lawrence D’Oliveiro writes:
The original problem -- triples of
Lawrence D’Oliveiro writes:
> On Wednesday, March 14, 2018 at 2:18:24 PM UTC+13, Ben Bacarisse wrote:
>> Lawrence D’Oliveiro writes:
>>
>> The original problem -- triples of natural numbers -- is
>> not particularly hard, but the general problem -- enumerating n-tuples
>> of some sequence -- is
Lawrence D’Oliveiro writes:
> On Tuesday, March 13, 2018 at 1:58:48 PM UTC+13, Ben Bacarisse wrote:
>> Of course you can always generate n-tuples of N and then map these to
>> n-tuples of the intended sequence but that seems inelegant.
>
> This whole discussion seems to be going off on esoteric,
On Sun, 11 Mar 2018 01:40:01 +, Ben Bacarisse wrote:
> I'm sure deep recursion is not needed, it's just tricky translating from
> a lazy language when one is not familiar with all the iterator
> facilities in Python. For example, I couldn't find an append operation
> that returns an iterable.
Lawrence D’Oliveiro writes:
> On Sunday, March 11, 2018 at 2:40:16 PM UTC+13, Ben Bacarisse wrote:
>> It would be nice to avoid relying on any value-based ordering.
>
> I don’t see why. The set of elements has to have the same cardinality
> as the set of natural numbers, after all. Why not take a
Lawrence D’Oliveiro writes:
> On Sunday, March 11, 2018 at 3:24:05 AM UTC+13, Ben Bacarisse wrote:
>> Unfortunately my Python is not up to using iterators well enough to
>> avoid a "maximum recursion depth exceeded" error.
>
> My solution only needed recursion up to a depth equal to the length of