Partition an integer x into n primes: Difference between revisions
m
→{{header|Haskell}}
m (→{{header|Haskell}}: (minor reductions – fractionally faster)) |
|||
Line 613:
-------------------- PRIME PARTITIONS ---------------------
| n <= 1 =
[ x
Line 638:
" -> "
[ justifyLeft 9 ' ' (show (x, n))
, let xs =
in bool (intercalate "+" (show <$> xs)) "(no solution)" (null xs)
]) <$>
|