On Oct 25, 8:32 pm, "Harry Kakueki" <list.p... / gmail.com> wrote:
> On 10/26/07, Brian Adkins <lojicdot... / gmail.com> wrote:
>
>
>
> > Consider the following code:
>
> > first = true
> > 3.times do
> >   if first
> >     first = false
> >   else
> >     puts 'foo'
> >   end
> >   ...
> > end
>
> > I'd like to be able to do the following instead:
>
> > 3.times do
> >   skip_first { puts 'foo' }
> >   ...
> > end
>
> arr = %w[foo bar bat foo]
>
> arr[1..-1].each do |x|
> p x
> end
>
> puts
> # OR
>
> arr.each_with_index do |x,i|
> p x if i !=0
> end
>
> If these are no good, then I am not understanding your question.

Correct.