From: Gary Wright Date: 2007-02-15T05:12:36+09:00 Subject: Re: Proc objects and Maintainability - a design note to self On Feb 14, 2007, at 8:45 AM, Kalman Noel wrote: > This makes me think that a Ruby programmer should maybe use the > word �call� > in several cases where you would use �run� or �start� or �process� in > other languages. Provided that �call� makes some sense in a > specific case, > it will line up beautifully with the core library. �alias [] call� may > come in handy, too. It might also make sense to define #to_proc as in: class Extra def initialize(i) @i = i end def call(a) a + @i end def to_proc lambda {|a| call(a) } end end add5 = Extra.new(5) [1,2,3,4].map &add5 # [6,7,8,9] Gary Wright