let sigma f l = List.fold_right (fun x r -> (f x) + r) l 0;;