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