reduce!reducer(MQ(x.front, 0), zip(x, sequence!"n"))

A small correction : you would need to use x.drop(1) instead of x, because the first element of x is only used to compute the initial value of 1. If you wanted k to have the same meaning as the one in your formula, you would need to use sequence!"n + 2" instead of sequence!"n".

Reply via email to