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 ← {
  𝕊 𝕩: 10 𝕊 𝕩;
  𝕨 𝕊 0: 0;
  (𝕨|𝕩)+𝕨𝕊⌊𝕩÷𝕨
}
 
•Show SumDigits 1
•Show SumDigits 1234
•Show 16 SumDigits 254