> f :: [input] -> state -> outputs

.. or with state monad m it could be a combination of

f :: [input] -> m outputs

f :: [input] -> outputs  - for intermediate results where state is not R/W


state + IO is not too difficult. here is a very good explanation
I understood the last one - Use liftIO - best