From: Christian Neukirchen Date: 2005-03-07T04:50:36+09:00 Subject: Re: ruby-dev summary 25741-25780 Takaaki Tateishi writes: > Christian Neukirchen wrote: >> What about foo { |a| ... } { |b| ... } ? }:-) > > In my opinion, foo{|a|...}{|b|...} had better be semantically equivalent to foo(){|a|...}(){|b|...} > at this time. What do you think? For example, we can write the following code. > > myif = {|&cond| > if( cond() ) > {|&then_block| {|&else_block| then_block()}} > else > {|&then_block| {|&else_block| else_block()}} > end > } > > I hope we are able to invoke the above Proc object as follows. > > myif{ true }{"then"}{"else"} > myif(){ true }(){"then"}(){"else"} Convinces me, although I was thinking of foo(lambda{|a|..}){|b|...}. > Takaaki Tateishi -- Christian Neukirchen http://chneukirchen.org