First of all, sorry for my bad english. I'm not native and try my best :)
Now to the problem: i have a list of Strings and want to convert them to a list of integers. The Problem is, it's not just numbers, basically the String is a List to.
["[1,2,3,4,5,6,7,8]","[8,7,6,5,4,3,2,1]","[1,2,3,4,5,6,7,8]"]
This is the result i get from my code i'll post further down.
Any idea how i can achieve, that the internal list of numbers are list of integers? I tried like three hours and didn't find a solution.
Every help is appreciatet.
Kind regards
get "/authors/:author" $ do
authorName <- param "author"
directories <- liftIO(listDirectory("data/" ++ authorName))
liftIO(readFiles directories authorName)
html (T.pack (HtmlModule.h1 ("Author: " ++ authorName)))
readFiles :: [String] -> String -> IO ()
readFiles x authorName = do
let y = addPrefix x authorName
content <- mapM readFile y
putStrLn (show content)
Result: ["[1,2,3,4,5,6,7,8]","[8,7,6,5,4,3,2,1]","[1,2,3,4,5,6,7,8]"]