Task

Take a   Natural Number   in a given base and return the sum of its digits:

   110         sums to   1
   123410   sums to   10
   fe16       sums to   29
   f0e16     sums to   29


sumDigits := proc( num )
	local digits, number_to_string, i;
	number_to_string := convert( num, string );
	digits := [ seq( convert( h, decimal, hex ), h in seq( parse( i ) , i in number_to_string ) ) ];
	return add( digits ); 
end proc:
sumDigits( 1234 );
sumDigits( "fe" );