home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / chapm20.zip / fixw30.cls < prev    next >
Text File  |  1995-06-19  |  684b  |  29 lines

  1. "Initialization code"
  2.  !
  3.  
  4.  
  5.  
  6. !Collection methods !
  7.   
  8. collect: aBlock
  9.         "For each element in the receiver, evaluate aBlock with
  10.          that element as the argument.  Answer a new collection
  11.          containing the results as its elements from the aBlock
  12.          evaluations."
  13.         "@25.02.94 ch: bug fix: use OrderedCollection instead of 
  14.         self species as the class of the new collection."
  15.     | answer |
  16.     answer := OrderedCollection new.
  17.     self do: [ :element |
  18.         answer add: (aBlock value: element)].
  19.     ^answer! !
  20.  
  21.  
  22.  
  23. !Collection class methods ! !
  24. "Finalization code"
  25.     !
  26.  
  27.  
  28. Transcript cr; nextPutAll: 'Bug Fixes VSW 3.0 installed.'!
  29.