Numbers with prime digits whose sum is 13: Difference between revisions
Numbers with prime digits whose sum is 13 (view source)
Revision as of 04:38, 22 October 2020
, 3 years ago→{{header|Haskell}}
(→{{header|Haskell}}: Parameterized target sum, formatted output.) |
|||
Line 203:
where
primeDigits = [2, 3, 5, 7]
go :: [[Int]] -> Maybe ([Int], [[Int]])
go xs
| null xs = Nothing
| otherwise = Just (nextLength xs)
nextLength :: [[Int]] -> ([Int], [[Int]])
nextLength xs =
|