concept State in category functional programming

appears as: State
Functional Programming with Kotlin

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

It is worth noting that this style of for-comprehension will not work with our Option type, as the supported classes need to be instances of Arrow’s Monad type class. We will learn about Monads and type classes later in the book, but for now suffice to say that this will only work with Arrow’s supported types such as Option, Either, List, State and IO to mention but a few.

Listing 6.22. Generalized State type alias for state transition
typealias State<S, A> = (S) -> Pair<A, S>

Here State is short for computation that carries some state along, or state action, state transition, or even statement (see section 6.6). We might want to write it as its own class, wrapping the underlying function and naming it run.