Largest int from concatenated ints: Difference between revisions

Content deleted Content added
m →‎{{header|REXX}}: added/changed comments and whitespace, changed indentation. -- ~~~~
Line 111: Line 111:
<lang haskell>import Data.List (sortBy)
<lang haskell>import Data.List (sortBy)


nines = 9:map ((+9).(*10)) nines
nines = iterate ((+9).(*10)) 9


maxcat = foldl (\a (n,d)->a * (1 + d) + n) 0 .
maxcat = foldl (\a (n,d)->a * (1 + d) + n) 0 .