From: "David A. Black" Date: 2009-01-12T12:59:02+09:00 Subject: Re: functional programming Hi -- On Mon, 12 Jan 2009, Mike Gold wrote: > Joel VanderWerf wrote: >> Perhaps I'm distracted by the specifics of mean and missing the general >> point... > > 'mean' stands for anything. I should have called it 'some_func'. You > can't just change its meaning. In particular, you can't change the > methods in the ruby standard library. (Well, you can, but you'll be > in danger of receiving a painful retributive wedgie from those who use > your code. Perhaps even an atomic one.) > > You can always write wrappers which convert a given method or lambda > to a one-argument lambda expecting an array. But this is just another > kind of Lisp emulation in Ruby, taking non-homogeneous primitives and > making them homogeneous. Can you give an example of the kind of meaning-changing you mean -- that is, what you would be doing if you could do it? I'm not quite getting it. David -- David A. Black / Ruby Power and Light, LLC Ruby/Rails consulting & training: http://www.rubypal.com Coming in 2009: The Well-Grounded Rubyist (http://manning.com/black2) http://www.wishsight.com => Independent, social wishlist management!