GENERIC FUNCTION WHICH SUM UP ELEMENTS FROM GIVEN CONTAINER