
6 Mar
2021
6 Mar
'21
12:31 a.m.
Hello, I was wondering what the best way was for tranforming a list of alphanumerical characters from main IO() such as: Enter String: A 101 E 182 and tranforming it into an Int list of [0, 101, 4, 182] Which converting A and E to 0 and 4 is easy enough with toEnum/fromEnum and simple subtraction, and using read can convert to a [Char], but recognizing 101 as a single Int from a Char string in main, and getting both converted together as part of the same function, I'm a bit less sure of without resorting to much lower level imperative methods. Thanks in advance and thank you for your time.