Chapter 7Understanding IO
Up to now, we’ve been glossing over one of the most fundamental operations in programming and one of the major stumbling blocks people run into when they start learning Haskell: getting information into and out of your program.
One of the most common reasons that people struggle with understanding IO in Haskell is that the mechanics for how to do IO are taught without a thorough explanation of the reasoning behind them. Without understanding the reason for IO working the way it does, it can seem unreasonably complicated. In this chapter, you’ll learn why IO in Haskell needs to work a bit differently than it does in other languages. You’ll also develop intuition for how to work with it so that it doesn’t feel so alien. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access