Hi,
In message "Re: Set#map! vs. map"
on Tue, 3 Jun 2008 10:13:07 +0900, "David A. Black" <dblack / rubypal.com> writes:
|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.
Do you want to make a new rule that map should return the object of
the same class as the receiver? If so, what do you think collect
(currently map's alias) should return?
matz.