WebThe SortCriteria and SortCriteriaColumn (and SortCriteriaTest for an example) are the classes that are added to the Smalltalk system. No changes to SortedCollection were required or other Smalltalk system classes. An example of constructing a Multi Column sort using the SortCriteria. aSortedList aSortCriteria aSortCriteria := SortCriteria new. WebOrdered Collections in Smalltalk. While all objects of type Array are fixed size arrays, instances of class OrderedCollection can be of varying size. To create an …
Smalltalk.org™ ZokuTalk™ Lisp, Smalltalk, + Others Hybrid
http://gnu.ist.utl.pt/software/smalltalk/gst-manual/gst_173.html WebPermutations and Combinations permutationsDo: aBlock • execute aBlock (self size factorial) times, with a single copy of self reordered in all possible ways. combinations: kk atATimeDo: aBlock • take my items kk at a time, and evaluate aBlock (self size take: kk) times, once for each combination. flag of city of new york
Simple Collections in Smalltalk - cs.brynmawr.edu
WebFind changesets by keywords (author, files, the commit message), revision number or hash, or revset expression. WebSortedCollection uses a replaceable piece of Smalltalk code, held in a block, to capture the comparison that's used to decide whether one object should be before or after another in the collection. Note that we're not talking about the sorting algorithm here—that's fixed, and embodied in SortedCollection. WebSortedCollection provides that extra capability. By default, elements are sorted in ascending order. You can override this default by specifying an alternative sort algorithm enclosed in a block. For example, The expression: SortedCollection sortBlock: [:x :y x >= y] creates a new collection whose elements will be sorted in descending order. canon 6d connect macbook