rendered paste bodyimport Data.Char
digitoum n | ((sum (zipWith (*) (reverse [2..10]) [take 9 [Data.Char.digitToInt x | x <-n]])) `mod` 11)<2 = 0
| otherwise = 11 - (sum (zipWith (*) (reverse [2..10]) [take 9 [Data.Char.digitToInt x | x <-n ]]) `mod` 11)
digitodois n | ((sum (zipWith (*) (reverse [2..11]) [take 10 [Data.Char.digitToInt x | x <-n]])) `mod` 11)<2 = 0
| otherwise = 11 - (sum (zipWith (*) (reverse [2..11]) [take 9 [Data.Char.digitToInt x | x <-n]]) `mod` 11)
validarcpf n | [Data.Char.intToDigit(digitoum n)]++[Data.Char.intToDigit(digitodois n)]==drop 9 n=True
| otherwise=False