Talk:Product of divisors: Difference between revisions

From Rosetta Code
Content added Content deleted
(Choosing the right abstraction - this is a double duplicate)
 
Line 7: Line 7:


[[User:Hout|Hout]] ([[User talk:Hout|talk]]) 17:42, 20 December 2020 (UTC)
[[User:Hout|Hout]] ([[User talk:Hout|talk]]) 17:42, 20 December 2020 (UTC)

There are numbers called divisorial related to that problem.
Single responsibility. It is like created the sigma function with all the cases and to use gamme function instead of factorial. --Blek

Revision as of 17:52, 20 December 2020

Choosing the right abstraction

This is really an exercise in defining a divisors function, and the only difference between the suggested Sum and Product draft tasks boils down to two trivial morphemes:

reduce(add, divisors(n), 0) vs reduce(mul, divisors(n), 1)

The goal of Rosetta code (see the landing page) is to provide contrastive insight (rather than comprehensive coverage of homework questions :-). Perhaps the scope for contrastive insight in the matter of divisors is already exhausted by the trivially different Proper divisors task.

Hout (talk) 17:42, 20 December 2020 (UTC)

There are numbers called divisorial related to that problem. Single responsibility. It is like created the sigma function with all the cases and to use gamme function instead of factorial. --Blek