def cummulative_sum(x):
  """Returns the cummulative sum of elements of a list."""
  # Create a copy of list x.
  output = x[:]
  for i in range(len(output) - 1):
    output[i + 1] += output[i]
  return output