How many subclasses does a class have?

Dan Ingalls DanI at wdi.disney.com
Wed Jun 17 15:57:36 UTC 1998


>data := Dictionary new.
>
>Object withAllSubclasses do: [:each | data at: each subclasses size put: 
>(data at: each subclasses size ifAbsent: [0]) + 1]
>
>data inspect

TerseMan says, just print...

(Object withAllSubclasses asArray collect: [:each | each subclasses size])
	asBag sortedElements





More information about the Squeak-dev mailing list