Richard wrote
>>>

I would check this in Pharo, but have so far failed to get it running under
Ubuntu 17.10.
Squeak _is_ running there, sort of, and the definition of #permutationsDo:
in Interval
is this code:

permutationsDo: aBlock
"Repeatly value aBlock with a single copy of the receiver. Reorder the copy
so that aBlock is presented all (self size factorial) possible
permutations."
"(1 to: 4) permutationsDo: [:each | Transcript cr; show: each printString]"

self asArray permutationsDo: aBlock

Exactly the same comment is found in SequenceableCollections.

Are you sure that Pharo has something different?  "with a SINGLE COPY of
the receiver" is pretty important.
...
<<<

Thanks Richard. The Pharo comment is identical. The problem was simply that
I hadn't understood what it was - quite clearly - telling me. Now that I
understand the problem, the explanation makes perfect sense :-)

Cheers
Andy

Reply via email to