Product of digits of sum
Write a function that takes one or more numbers as arguments. It should sum them, then multiply the digits. If the answer is one digit long, it's done. If it's more than one digit, repeat and multiply the digits again.
Examples
(sum-prod 4) ;=> 4
(sum-prod 10) ;=> 0 (since the sum is two digits, then 1 * 0)
(sum-prod 11 12) ;=> 6
(sum-prod 12 16 223) ;=> 0 (work it out!)
Thanks to this site for the problem idea, where it is rated Very Hard in Java. The problem has been modified.
Please submit your solutions as comments on this gist.
To subscribe: https://purelyfunctional.tv/newsletter/
how do you get colors in github comments?