'From Squeak3.6alpha of ''17 March 2003'' [latest update: #5247] on 6 June 2003 at 3:07:34 pm'! "Change Set: permutationsDoFix-dtl-md Date: 31 May 2003 Author: David T. Lewis The example in the method comment of SequenceableCollection>>permutationsDo: does not work. Adding a #permutationsDo: method to class Interval fixes this. The interval is converted to an Array to produce the intended behavior. MD: removed the testcase. Testcase has been added to BaseImageTests."! !Interval methodsFor: 'enumerating' stamp: 'dtl 5/31/2003 16:45'! 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 ! !