Skip to content

Instantly share code, notes, and snippets.

@axel-andrade
Created September 2, 2020 22:16
Show Gist options
  • Save axel-andrade/7dbeae06c1e62c560499d75d5d8cf3d3 to your computer and use it in GitHub Desktop.
Save axel-andrade/7dbeae06c1e62c560499d75d5d8cf3d3 to your computer and use it in GitHub Desktop.
> alphas :: String -> String
> alphas xs = filter (isAlpha) xs
> propAlphasCorrect :: String -> Bool
> propAlphasCorrect xs = isCorrect (alphas xs)
> where
> isCorrect ys = all (isAlpha) ys
> uppers :: String -> String
> uppers xs = map toUpper xs
> propUppersCorrect :: String -> Bool
> propUppersCorrect xs = isCorrect (uppers xs)
> where
> isCorrect ys = all (isUpper) ys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment