Small confusion with monads

Ashley Yakeley ashley@semantic.org
Thu, 4 Oct 2001 02:16:34 -0700


At 2001-10-04 02:02, Dmitry Olyenyov wrote:

>I have the list ["file1","file2","file3"] and I need the
>function to return me the list of contents of these files.
>
>contents :: [String] -> [String]

That cannot be safely done with that type. A "pure" function like that is 
not allowed to do "imperative" stuff such as reading files.

-- 
Ashley Yakeley, Seattle WA