romanToDecimal :: RomanNum -> Int
romanToDecimal = loop 0 . map romanAlgToDecimal
  where loop m (x:xs@(y:_)) | x < y = loop (m - x) xs
        loop m (y:ys)   = loop (m + y) ys
        loop m []       = m
romanToDecimal :: RomanNum -> Int
romanToDecimal = loop 0 . map romanAlgToDecimal
  where loop m (x:xs@(y:_)) | x < y = loop (m - x) xs
        loop m (y:ys)   = loop (m + y) ys
        loop m []       = m
romanToDecimal = loop 0 . map romanAlgToDecimal
  where loop m (x:xs@(y:_)) | x < y = loop (m - x) xs
        loop m (y:ys)   = loop (m + y) ys
        loop m []       = m