Hi --

I'm just wondering about this:

>> RUBY_DESCRIPTION
=> "ruby 1.9.0 (2008-06-03 revision 16244) [i686-darwin9.2.2]"
>> require 'set'
=> true
>> s = Set.new(1..10)
=> #<Set: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}>
>> s.map {|e| e + 10 }
=> [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
>> s.map! {|e| e + 10 }
=> #<Set: {11, 12, 13, 14, 15, 16, 17, 18, 19, 20}>

I'm just wondering whether it would make more sense for Set to have a
#map method that returned a set, rather than an array, as long as that
behavior is considered meaningful (as it appears to be since that's
how Set#map! is working). Otherwise that aspect of the map/map!
distinction seems kind of arbitrary.


David

-- 
Rails training from David A. Black and Ruby Power and Light:
   INTRO TO RAILS         June 9-12            Berlin
   ADVANCING WITH RAILS   June 16-19           Berlin
See http://www.rubypal.com for details and updates!