You are viewing a single comment's thread. Return to all comments →
Haskell.
import Data.Maybe (mapMaybe) import Text.Read (readMaybe) f :: Num a => [a] -> [a] f = map abs main :: IO () main = interact (unlines . map show . f . mapMaybe readMaybe . lines)
import Data.Maybe (mapMaybe) import Text.Read (readMaybe) main :: IO () main = interact (unlines . map (show . abs) . mapMaybe readMaybe . lines)
Seems like cookies are disabled on this browser, please enable them to open this website
Update List
You are viewing a single comment's thread. Return to all comments →
Haskell.