« Return to Thread: Proposal: Array#walker

Re: Proposal: Array#walker

by trans :: Rate this Message:

Reply to Author | View in Thread



On Nov 13, 10:51 pm, Trans <transf...@...> wrote:

> However, a few times I've wanted a nicer way to split the array at an
> index. Something like:
>
>   a.each_with_index do |el, i|
>     pre, post = *a.crack(i)
>     ...
>   end

Actually, can anyone recommend a better name than #crack? --or a way
to already do this?

T.


 « Return to Thread: Proposal: Array#walker