Higher-order messaging in Ruby

Hi all.

Jus stumbled upon interesting post here:

One more trick allowing goodies like


=> [1,2,3,4]

[0,1,2,3,4].do_collect * 2

=> [0,2,4,6,8]

And so on.
Wow, IMHO.


On 10/11/06, Victor Zverok S. [email protected] wrote:


Sorry for deluding you, but we just had this, it just got into a fierce
very interesting - discussion about magic.dot.notation and
magic_underscore_notation and &:_symbol? ? &:other : proc{|n|
(well I am just kidding with the last one).

Cheers, Robert = Class.new( Greetings ) * 2

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man.

  • George Bernhard Shaw

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs