Dec. 4, 2009
6:36 p.m.
Em 04/12/2009 05:58, Lukas Renggli < renggli@gmail.com > escreveu:
I wonder if ever something along the following lines was considered?
Dictionary>>keys "Answer a Set containing the receiver's keys."
| result | result := Set basicNew. result setTally: tally array: (array collect: [ :each | each isNil ifFalse: [ each key ] ]). ^ result
Why not: | result | result := Set basicNew. result setTally: tally array: (array collect: [ :each | each ifNil: [ each key ] ]). ^ result A bit more OO ;-) Reading Andrés' book is making more aware of those subtleties :-D My .019999... - Cesar Rabak