As in LYAHThe problem also with using withFile and a lambda is that in my infinite Haskell beginnerness, I do not know how to get thecontents out of the lambda for use later for the second try of withFile in WriteMode.
- withFile "girlfriend.txt" ReadMode (\handle -> do
- contents <- hGetContents handle
- putStr contents)
how to retrieve contents for later use? Scope of contents variable in inside lambda only it would appear.