adder scala impl