Jane Street Interview Question

Given an spreadsheet API with functions -> GetValue(), SetValue(), SetFormula(), how will you calculate the sum of an array?