[Haskell-beginners] IO a, IO b
Imants Cekusins
imantc at gmail.com
Tue Dec 15 16:38:30 UTC 2015
Hello all,
This looks like another potential 1+ day problem for me. Could you please help?
Problem:
a few (... -> IO a) functions are called as part of the same "do"
block of container function
these functions may return various IO a: "a" can be of different types
I need the return values to proceed i.e. would call
val <- (... -> IO a)
container function returns IO b
specifically, let's consider 2 functions called inside do block:
... -> IO Bool
... -> IO (Either String a)
container function returns IO (Either String a)
Questions:
1) what is a beginner-friendly way of doing this?
2) how would you do this?
links, ideas or snippets will all be appreciated.
More information about the Beginners
mailing list