Native function for doing a sum over a list.