a) I need to cast from String
to int
in haskell. I have a function that gets the third word in a sentence as a string, but my third word in all my sentences are numbers (int), how can I cast from string to int so then I can use the number afterwards to do operations like add or mult?
getThirdWord :: String -> String
getThirdWord = head . tail . tail . words
b) I'm using Visual Haskell Studio. How can I use functions like map
and zip
in visual haskell studio? Are there any plugins that I need to include to my vhs to make them work?
Thank you so much in advance!