Instantiate an IndexedState[S1, S2, A]
.
Instantiate an IndexedState[S1, S2, A]
.
Example:
scala> import cats.data.IndexedState scala> val is = IndexedState[Int, Long, String](i => (i + 1L, "Here is " + i)) scala> is.run(3).value res0: (Long, String) = (4,Here is 3)