concept imperative style in category functional programming

appears as: imperative style, n imperative style, imperative style
Functional Programming with Kotlin

This is an excerpt from Manning's book Functional Programming with Kotlin.

Most of us started programming using an imperative style of coding. What do we mean by this? It means that we give the computer a set of instructions or commands one after the other. As we do so, we are changing the system’s state with each step that we take. We are naturally drawn to this approach because of its initial simplicity. On the other hand, as programs grow in size and become more complicated, this seeming simplicity will lead to the very opposite; complexity arises and takes the place of what we initially intended to do. The end result is code that is not maintainable, difficult to test, hard to reason about and (possibly worst of all) full of bugs. The initial velocity that we were able to deliver features in slows down substantially until even a simple enhancement to our program becomes a slow and laborious task.

Up to now we have spent a lot of time developing our own implementation of State, and have learned a lot in doing so. We will now switch over to using an alternative implementation provided by the Arrow library. In Chapters 3 and 4 we already introduced Arrow as a functional library for Kotlin. In particular, we learned about the Option and Either constructs that are already provided as part of this library. It so happens that Arrow also provides a very handy implementation of State that has an enhancement that our version does not have. The additional feature of interest is the for-comprehension capability, which will enable the imperative style that we’re after.