From: Robert Klemme Date: 2012-02-09T17:42:01+09:00 Subject: Re: Using _ like in Scala? On Thu, Feb 9, 2012 at 1:39 AM, Josh Cheek wrote: > Yes, what I want is an editor feature (it's also a cognitive aid, even > without an editor to take advantage of it), but it requires a language > feature to enable. OK, just trying to clarify. You wrote > Although what I'd really like would be a syntax for naming inline blocks, > then my editor could fold the block body inside the name, something like > %w[apple banana orange].each display > > And it would expand to something like > %w[apple banana orange].each { |display -> fruit| puts fruit } Somehow I didn't understand what you meant by "syntax for naming inline blocks" because it did not occur to me that you might be missing something we actually do have already: irb(main):001:0> display = ->(x) { puts x } => # irb(main):002:0> %w[apple banana orange].each &display apple banana orange => ["apple", "banana", "orange"] Now, what is missing? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/