let sigma f t j k = let y = ref 0 in for i = j to k do y := !y + f t.(i) done; !y;;