How can I create a lowercase checker?

user6100041

I'm having trouble understanding how this recursion works, for example, if I want to make a String -> Boolean exercise to know if the string has a lower case in it how can i do it?This is my big amateur code, thats not even running the list properly, although I don't know any better:

lowercase (x:xs) | isLower x lowercase xs = True
                 | otherwise = False
lisyarus

You have a good idea, but bad syntax.

lowercase :: String -> Bool
lowercase [] = True -- this case is needed to ensure that recursion stops
lowercase (x:xs) | isLower x = lowercase xs
lowercase _ = False

Or, using standard library,

lowercase = all isLower

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I speed up a primality checker?

From Dev

how to create a backlink checker

From Dev

How can I convert my strings to lowercase?

From Dev

How would I create a palindrome checker without if statements

From Dev

How can I convince the borrow checker to allow me to cache values?

From Dev

How can I configure the omnisharp syntastic syntax checker to be more lenient?

From Dev

How can I model a bidirectional map without annoying the borrow checker?

From Dev

How can I view the color contrast checker in chrome for windows?

From Dev

How can I convince the borrow checker to allow me to cache values?

From Dev

How can I merge two spell checker dictionaries?

From Java

How can I make pandas dataframe column headers all lowercase?

From Java

How can I convert uppercase letters to lowercase in Notepad++

From Dev

Scala how can I uppercase first character and lowercase others

From Dev

How can I identify uppercase and lowercase characters in a string with swift?

From Dev

How can I set a string variable and make it always lowercase?

From Dev

How can I LowerCase all the HashMap's values?

From Dev

How can I lowercase substrings in pandas data frame?

From Dev

How can i check if the file extension is uppercase or lowercase?

From Dev

How can I force a UITextField to only support lowercase characters?

From Dev

How do I create a lowercase i with a combining accent mark that does not replace the i's dot in MS Word?

From Dev

How can I filter the JSON coming back from the npm license-checker package?

From Dev

How can I make Syntastic load a different checker based on existance of files in root?

From Dev

How do I fix the problem with the capitalization checker?

From Dev

How can i create a JButton?

From Dev

How can I create a converter?

From Dev

How can i create an object

From Dev

How can I create such TabLayout?

From Dev

How can I create this RegEx?

From Dev

How to create lowercase pi (“π”) with compose key?

Related Related

  1. 1

    How can I speed up a primality checker?

  2. 2

    how to create a backlink checker

  3. 3

    How can I convert my strings to lowercase?

  4. 4

    How would I create a palindrome checker without if statements

  5. 5

    How can I convince the borrow checker to allow me to cache values?

  6. 6

    How can I configure the omnisharp syntastic syntax checker to be more lenient?

  7. 7

    How can I model a bidirectional map without annoying the borrow checker?

  8. 8

    How can I view the color contrast checker in chrome for windows?

  9. 9

    How can I convince the borrow checker to allow me to cache values?

  10. 10

    How can I merge two spell checker dictionaries?

  11. 11

    How can I make pandas dataframe column headers all lowercase?

  12. 12

    How can I convert uppercase letters to lowercase in Notepad++

  13. 13

    Scala how can I uppercase first character and lowercase others

  14. 14

    How can I identify uppercase and lowercase characters in a string with swift?

  15. 15

    How can I set a string variable and make it always lowercase?

  16. 16

    How can I LowerCase all the HashMap's values?

  17. 17

    How can I lowercase substrings in pandas data frame?

  18. 18

    How can i check if the file extension is uppercase or lowercase?

  19. 19

    How can I force a UITextField to only support lowercase characters?

  20. 20

    How do I create a lowercase i with a combining accent mark that does not replace the i's dot in MS Word?

  21. 21

    How can I filter the JSON coming back from the npm license-checker package?

  22. 22

    How can I make Syntastic load a different checker based on existance of files in root?

  23. 23

    How do I fix the problem with the capitalization checker?

  24. 24

    How can i create a JButton?

  25. 25

    How can I create a converter?

  26. 26

    How can i create an object

  27. 27

    How can I create such TabLayout?

  28. 28

    How can I create this RegEx?

  29. 29

    How to create lowercase pi (“π”) with compose key?

HotTag

Archive