just a second before we go further...
Ais the output
get: State[Int, Int]
State[Int, Int](the first
Intis the state, and stays as it is, the second state is the result, and gets incremented)
State[Int, String](the state is an Int, the result is now
Stateyou don't really look at it as "transforming the output of a program"
map? (don't worry about making it infix)
get[Int].map(_ + 1).map(_.toString)is describing the sequence of transformations (that I described above) over an
Int, that we will pass eventually, in
Stateto allow to be called infix