concept IO type in category functional programming

This is an excerpt from Manning's book Functional Programming in Java: How functional techniques improve your Java programs.
By using the IO type, you can create impure programs (programs with effects) in a purely functional way. But at this stage, these programs only allow us to read from and print to an element such as your Console class. You can extend your DSL by adding instructions to create control structures, such as loops and conditionals.

This is an excerpt from Manning's book Functional Programming in Scala.
Despite the flexibility of the IO monad and the advantage of having I/O actions as first-class values, the IO type fundamentally provides us with the same level of abstraction as ordinary imperative programming. This means that writing efficient, streaming I/O will generally involve monolithic loops.