>
> I'd even say that `embed` is wrong.
>
> I would like to know of a good example of use case. I often succumb to the
> temptation of writing more complex code to avoid creating a local var, but
> that doesn't always make for better code.
>
> The example given in the github PR was:
>
>     [ 1, 2, 3, 4].select{|x| x.odd?}.embed{|x| {:total => x.count, :data
> => x}}...
>
> I feel the following is clearer:
>
>     odd_nbs = [ 1, 2, 3, 4].select{|x| x.odd?}
>     {:total => odd_nbs.count, :data => odd_nbs}...



How about `infix`? I think this method could be a useful addition, even if
it's rarely used. Also, the example usage might be clearer with a better
block argument:

     [ 1, 2, 3, 4].select{|x| x.odd?}.infix{|odd_nbs| {:total => odd_nbs.count,
:data => odd_nbs}}