--- a/PowerSet.st Mon Mar 20 09:50:28 2006 +0100
+++ b/PowerSet.st Mon Mar 20 09:53:02 2006 +0100
@@ -66,6 +66,31 @@
[see also:]
Set Interval
"
+!
+
+examples
+"
+ [exBegin]
+ |s p|
+
+ s := #(1 2 3).
+ p := PowerSet for:s.
+
+ p do:[:eachSubSet |
+ Transcript showCR:eachSubSet
+ ].
+ [exEnd]
+
+ A huge powerSet - do not enumerate its elements ;-)
+ [exBegin]
+ |s p|
+
+ s := (1 to:1000).
+ p := PowerSet for:s.
+
+ Transcript show:'p''s size is: '; showCR:p size
+ [exEnd]
+"
! !
!PowerSet class methodsFor:'instance creation'!
@@ -118,5 +143,5 @@
!PowerSet class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/PowerSet.st,v 1.1 2006-03-20 08:50:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/PowerSet.st,v 1.2 2006-03-20 08:53:02 cg Exp $'
! !