cumsum.R

Cumsum =
  # This does the computation in line
function(x)
{
   for(i in 2:length(x))  # pardon the case where x is of length 1 or 0
     x[i] = x[i-1] + x[i]

   return(x) # don't need the return
}
duncantl/RLLVMCompile documentation built on May 15, 2019, 5:31 p.m.