I have been doing some programming excercises lately which all includes some sort of parsing a string / iterating over a string input. Unless I use
String.map and then are forced to get back a new string, or use impure
String.iter, I have to write my own
explode-function (I haven’t found any
explode function in any of the standard libraries) to get a list of chars from the string input. And «exploding» the string seems to be to only way to apply pattern matching on a string.
I wonder if others have experience parsing / pattern matching on strings, and if they have other solutions than what I described here?