As of right now I am reading in an entire input file using inputAll and then using String.tokens to split each word at every occurrence of space.
val file = TextIO.openIn input
val _input = TextIO.inputAll file
val _ = TextIO.closeIn file
String.tokens Char.isSpace _input
Ex) "red blue green" would look like this
["red", "blue", "green"]
However, now I would like to change it to only split the string at the first occurrence of a space char on each line.
Ex) "red blue green" should look like
["red", "blue green"]
I have a feeling I will need to utilize something other than inputAll to accomplish this, and my main question is how do you make it so it only splits at the first space of each line.