higher order funcs sum example