Anonymous user
A+B: Difference between revisions
→{{header|Haskell}}
m (→{{header|Ruby}}: demonstrate the "inject(&:symbol)" syntax) |
|||
Line 103:
</pre>
sum' :: [Char] -> Int
sum' = sum . map read . words
▲<lang haskell>import Control.Monad
main = getLine >>= (\xs -> putStrLn $ show $ sum' xs)
</lang>
=={{header|Java}}==
|