How to port C Lowpass filter code into Julia

I am having difficulty porting Julius Smith's lowpass filter C code into Julia. In particular, I am having difficulty understanding how this particular C for loop can be executed within Julia.

/* C function implementing the simplest lowpass:
 * 
 *      y(n) = x(n) + x(n-1)
 *
 */
double simplp (double *x, double *y, 
               int M, double xm1)
{
  int n;
  y[0] = x[0] + xm1;
  for (n=1; n < M ; n++) {
    y[n] =  x[n]  + x[n-1];
  }
  return x[M-1];
}

Here is the webpage where the code resides for more context: https://ccrma.stanford.edu/~jos/fp/Definition_Simplest_Low_Pass.html

Thanks, Nakul