Why will a IO nested in other monads not execute? Is there a way to force them to?
问题 This is a follow up of my last question. IO action nested in other monads not executing The solution to that question was to remove some of the monads, and that allowed the IO action to execute. Why did I need to unnest the monads? Is there a way to execute the IO without unnesting? Note : This is a what-if more than it is a question about good or bad practice. 回答1: Perhaps it would help to think of IO as type IO a = World -> (a, World) ; that is, a function that takes as its only parameter