let rec sigma f = function
  | [] -> 0  
  | x :: rest -> f x + sigma f rest;;