> I have got such a function like "Object => o -> IO(int, int)" from
> existing API, and actually I needed is the parameters of "IO(int,
> int)". How can I get these 2 parameters? just use a sentence like "x
> <- fst(IO(int, int))"? Is it works?
No, that doesn't work: Read up on Monads. Tutorials have just been
mentioned in a different thread.
> Or somebody will have a good idea to help me?
Try something like
> foo o = do
> (x1,x2) <- yourFunction o
> -- now do something with x1 and x2, eg add them:
> return (x1+x2)
But if you don't understand how to use the IO-Monad, you'll probably
quickly get stuck again.
- Dirk
Thank you very much! I will read the tutorial first