SequenceableCollection.st
changeset 10749 967a9e8adfc0
parent 10590 6f1ae91a406e
child 10812 88568f2c6647
--- a/SequenceableCollection.st	Mon Oct 22 13:38:41 2007 +0200
+++ b/SequenceableCollection.st	Mon Oct 22 13:49:14 2007 +0200
@@ -608,7 +608,7 @@
 !
 
 permutationsStartingAt: anInteger do: aBlock
-    "#(1 2 3 4) permutationsDo: [:each | Transcript cr; show: each printString]"
+    "a helper for permitationsDo:"
 
     |mySize|
 
@@ -616,12 +616,16 @@
     anInteger > mySize ifTrue: [^self].
     anInteger = mySize ifTrue: [^aBlock value: self].
     anInteger to:mySize do:[:i |
-	self swap: anInteger with: i.
-	self permutationsStartingAt: anInteger + 1 do: aBlock.
-	self swap: anInteger with: i
+        self swap: anInteger with: i.
+        self permutationsStartingAt: anInteger + 1 do: aBlock.
+        self swap: anInteger with: i
     ]
 
-    "Modified: / 13.11.2001 / 13:48:49 / cg"
+    "
+     #(1 2 3 4 5) permutationsDo: [:each | Transcript showCR: each]
+    "
+
+    "Modified: / 22-10-2007 / 13:51:12 / cg"
 ! !
 
 !SequenceableCollection methodsFor:'Compatibility-VW'!
@@ -7010,7 +7014,7 @@
 !SequenceableCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.247 2007-06-04 19:32:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.248 2007-10-22 11:49:14 cg Exp $'
 ! !
 
 SequenceableCollection initialize!