On Saturday, February 7, 2015 at 6:45:40 AM UTC-8, Evan Pu wrote:
>
> i see, maybe my example is too special.
> What i meant is I have an array of elements and I have a binary operator 
> which I want to apply to every adjacent elements.
>

No, I think you have to use a loop or comprehension, e.g. [op(a[i],a[i+1]) 
for i in 1:length(a)-1].   This is pretty compact and efficient, so I doubt 
it's worth trying to condense further.

Reply via email to