Florian Gro? wrote:
> Trans wrote:
>
> > Seems like a very insteresting and useful notion to locally name the
> > block. And open up other possibilites like:
> >
> >   [:a,:b,:c].each do n(i)
> >     if n.first?
> >        # ...
> >     end
> >   end
> >   #=> 1 2 3
>
> I'd insert an as:
>
> [:a, :b, :c].each as n(i) do
>    if n.first? then
>      # ...
>    end
> end
>
> Still needs getting used to it, though.

That'll work. Fits in well with the "with" version too. And really if
you substitute
-> == as/with
 { == do
 } == end

  [:a, :b, :c].each -> n(i) {
     if n.first? then
       # ...
     end
  }

All except for the named block, this is excactly what matz has now.

T.