The decomp function creates a (factor, power) map describing the decomposition of an integer. The decompFactorial function creates this decomposition for all integers from 2 to n, then merges the maps summing the values for each key. The result is then pretty printed.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Haskell
The
decompfunction creates a(factor, power)map describing the decomposition of an integer. ThedecompFactorialfunction creates this decomposition for all integers from2ton, then merges the maps summing the values for each key. The result is then pretty printed.