Q&A
Ask and answer questions to make information more available to wider audiences.
Nevaeh Joiner @joinernevaeh   07, Jun 2023 12:00 AM
write a function that tests if a character is one of the following digits
Can you help me to write a function called isdigit that tests if a character is one of the digits '0', '1', …, '9'? It has this signature: isdigit :: Char -> Bool
answers 1
 
Answer 1
Jose Grimsbro @josegrimsbro   12, Jun 2023 07:39 PM
isdigit :: Char -> Bool
isdigit c = elem c "0123456789"