Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
A Question on Functional Programming Language
I know that not too many people are going to see this but I think this
is probably the place to post the message.
I'm writing a program in Haskell to test out some text formatting
functions and I want the text to be in a text file as opposed to being
hardcoded within the program.
So how do I convert an IO String to a String.
The language will not treat IO String and String the same way.
I did figure out how to test the text functions on an IO String,
which would look like
string1 = do line <- readFile "sample.txt"
putStrLn (textprocedure... line)
I just think it would be easier to convert the IO String to a String
and then simply call
0 · ·