IndexedState

cats.data.package$.IndexedState$
object IndexedState

Attributes

Source
package.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Inherited methods

def apply[S1, S2, A](f: S1 => (S2, A)): IndexedState[S1, S2, A]

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)

Attributes

Inherited from:
IndexedStateFunctions (hidden)
Source
IndexedStateT.scala