Pretty simple, I want to convert a character to integer using the function ord
, however it is not loaded automatically in the prelude because it says:
*Main> ord 'a'
<interactive>:55:1:
Not in scope: ‘ord’
Perhaps you meant one of these:
‘odd’ (imported from Prelude), ‘or’ (imported from Prelude)
How, for heaven's sake, I can use it??
You need to import Data.Char
first:
import Data.Char
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With